[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/3] sysemu/xen: Remove unreachable xen_ram_alloc() code
The xen_ram_alloc() call in softmmu/physmem.c is guarded by checking for xen_enabled(), which evaluate to 'false' when XEN is not built in. The compiler elide the function call, and thus the inlined function is not used. Remove it. Inspired-by: Daniel Henrique Barboza <dbarboza@xxxxxxxxxxxxxxxx> Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> --- include/sysemu/xen.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/include/sysemu/xen.h b/include/sysemu/xen.h index 9b2d0b21ff..1f797a9abe 100644 --- a/include/sysemu/xen.h +++ b/include/sysemu/xen.h @@ -27,8 +27,6 @@ extern bool xen_allowed; #define xen_enabled() (xen_allowed) void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length); -void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, - struct MemoryRegion *mr, Error **errp); #else /* !CONFIG_XEN_IS_POSSIBLE */ @@ -38,12 +36,10 @@ static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length) { /* nothing */ } -static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, - MemoryRegion *mr, Error **errp) -{ - g_assert_not_reached(); -} #endif /* CONFIG_XEN_IS_POSSIBLE */ +void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, + struct MemoryRegion *mr, Error **errp); + #endif -- 2.41.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |