Skip to content

Commit 501586e

Browse files
arndbbostrovs
authored andcommitted
xen/balloon: fix unused-variable warning
In configurations with CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=n and CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y, gcc warns about an unused variable: drivers/xen/balloon.c:83:12: error: 'xen_hotplug_unpopulated' defined but not used [-Werror=unused-variable] Since this is always zero when CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is disabled, turn it into a preprocessor constant in that case. Fixes: 121f2fa ("xen/balloon: rename alloc/free_xenballooned_pages") Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Boris Ostrovsky <[email protected]>
1 parent 121f2fa commit 501586e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/xen/balloon.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,8 @@
8080
static uint __read_mostly balloon_boot_timeout = 180;
8181
module_param(balloon_boot_timeout, uint, 0444);
8282

83-
static int xen_hotplug_unpopulated;
84-
8583
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
84+
static int xen_hotplug_unpopulated;
8685

8786
static struct ctl_table balloon_table[] = {
8887
{
@@ -115,6 +114,8 @@ static struct ctl_table xen_root[] = {
115114
{ }
116115
};
117116

117+
#else
118+
#define xen_hotplug_unpopulated 0
118119
#endif
119120

120121
/*

0 commit comments

Comments
 (0)