x86/cpu/bugs: Make retpoline module warning conditional
authorThomas Gleixner <tglx@linutronix.de>
Sat, 27 Jan 2018 14:45:14 +0000 (15:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Feb 2018 19:12:19 +0000 (11:12 -0800)
commit249b1f7a7f09c9c5243f8c592ea7fb13871968bc
tree22893397b651dd341abc48d9d5f072c2811aa558
parent91ff9a75f360eb89e913fcc4b3a7fbb602c67cbb
x86/cpu/bugs: Make retpoline module warning conditional

commit e383095c7fe8d218e00ec0f83e4b95ed4e627b02

If sysfs is disabled and RETPOLINE not defined:

arch/x86/kernel/cpu/bugs.c:97:13: warning: ‘spectre_v2_bad_module’ defined but not used
[-Wunused-variable]
 static bool spectre_v2_bad_module;

Hide it.

Fixes: caf7501a1b4e ("module/retpoline: Warn about missing retpoline in module")
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/bugs.c