Re: [PATCH] xen/balloon: fix unused-variable warning

From: Boris Ostrovsky
Date: Tue Nov 09 2021 - 08:30:53 EST



On 11/8/21 6:14 AM, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@xxxxxxxx>

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: 121f2faca2c0 ("xen/balloon: rename alloc/free_xenballooned_pages")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>



Applied to for-linus-5.16b


-boris