mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
HV: treewide: drop debug-only helpers in release build
There are multiple helpers for collecting info to be printed on the ACRN uart
console. They are unreachable code in release builds in which the uart console
is removed.
To define a precise boundary for safety-related activities, this patch wraps the
declarations and definitions to these helpers with "#ifdef HV_DEBUG" so that
these unreachable APIs will be dropped in release builds.
v1 -> v2:
* Fix coding style: no empty lines between #ifdef and the wrapped code.
* Also drop get_rte_info() in ioapic.c, which is solely used by
get_ioapic_info().
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -414,6 +414,7 @@ void resume_ioapic(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_rte_info(struct ioapic_rte *rte, bool *mask, bool *irr,
|
||||
bool *phys, int *delmode, bool *level, int *vector, uint32_t *dest)
|
||||
{
|
||||
@@ -469,3 +470,4 @@ int get_ioapic_info(char *str, int str_max_len)
|
||||
snprintf(str, size, "\r\n");
|
||||
return 0;
|
||||
}
|
||||
#endif /* HV_DEBUG */
|
||||
|
||||
Reference in New Issue
Block a user