Skip to content

Commit 637326b

Browse files
shiqingglijinxia
authored andcommitted
hv: clean up function definitions in vuart.h
seperate the function definitions into debug/release directories to better distinguish debug/release libraries Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 7b74b2b commit 637326b

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

hypervisor/include/debug/vuart.h

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,24 +65,14 @@ struct acrn_vuart {
6565
struct acrn_vm *vm;
6666
spinlock_t lock; /* protects all softc elements */
6767
};
68+
6869
#ifdef CONFIG_PARTITION_MODE
6970
extern int8_t vuart_vmid;
70-
#endif
71-
#ifdef HV_DEBUG
71+
#endif /* CONFIG_PARTITION_MODE */
72+
7273
void vuart_init(struct acrn_vm *vm);
7374
struct acrn_vuart *vuart_console_active(void);
7475
void vuart_console_tx_chars(struct acrn_vuart *vu);
7576
void vuart_console_rx_chars(struct acrn_vuart *vu);
76-
#else
77-
static inline void vuart_init(__unused struct acrn_vm *vm)
78-
{
79-
}
80-
static inline struct acrn_vuart *vuart_console_active(void)
81-
{
82-
return NULL;
83-
}
84-
static inline void vuart_console_tx_chars(__unused struct acrn_vuart *vu) {}
85-
static inline void vuart_console_rx_chars(__unused struct acrn_vuart *vu) {}
86-
#endif /* HV_DEBUG */
8777

8878
#endif /* VUART_H */

hypervisor/release/vuart.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (C) 2018 Intel Corporation. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
#include <hypervisor.h>
8+
9+
void vuart_init(__unused struct acrn_vm *vm) {}
10+
11+
struct acrn_vuart *vuart_console_active(void)
12+
{
13+
return NULL;
14+
}
15+
16+
void vuart_console_tx_chars(__unused struct acrn_vuart *vu) {}
17+
void vuart_console_rx_chars(__unused struct acrn_vuart *vu) {}

0 commit comments

Comments
 (0)