Re: [PATCH] x86/platform/uv: avoid unused variable warning

From: Arnd Bergmann
Date: Thu Dec 12 2019 - 09:01:54 EST


On Thu, Dec 12, 2019 at 2:58 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> When CONFIG_PROC_FS is disabled, the compiler warns about an
> unused variable:
>
> arch/x86/kernel/apic/x2apic_uv_x.c: In function 'uv_setup_proc_files':
> arch/x86/kernel/apic/x2apic_uv_x.c:1546:8: error: unused variable 'name' [-Werror=unused-variable]
> char *name = hubless ? "hubless" : "hubbed";
>
> Simplify the code so this variable is no longer needed.
>
> Fixes: 8785968bce1c ("x86/platform/uv: Add UV Hubbed/Hubless Proc FS Files")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

I noticed a second too late that this loses the oemid procfs file (annoyingly
I did not get a warning because gcc ignores unused static const variables)

Please wait for v2.

Arnd