Re: [PATCH] x86/boot/KASLR: Fix unused variable warning

From: Borislav Petkov
Date: Fri Jan 10 2020 - 04:52:49 EST


On Fri, Jan 10, 2020 at 05:43:04PM +0800, Zhenzhong Duan wrote:
> Local variable 'i' is referenced only when CONFIG_MEMORY_HOTREMOVE and
> CONFIG_ACPI are defined, but definition of variable 'i' is out of guard.
> If any of the two macros is undefined, below warning triggers during
> build with 'make EXTRA_CFLAGS=-Wall binrpm-pkg', fix it by moving 'i'
> in the guard.

Maybe I wasn't clear: save this patch for when it triggers in the normal
build, without additional build flags.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette