Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/fpu: Make WARN_ON_FPU() more robust in the !CONFIG_X86_DEBUG_FPU case

Make sure the WARN_ON_FPU() macro consumes the macro argument,
to avoid 'unused variable' build warnings if the only use of
a variable is in debugging code.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Bobby Powers <bobbypowers@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>

+1 -1
+1 -1
arch/x86/include/asm/fpu/internal.h
··· 49 49 #ifdef CONFIG_X86_DEBUG_FPU 50 50 # define WARN_ON_FPU(x) WARN_ON_ONCE(x) 51 51 #else 52 - # define WARN_ON_FPU(x) ({ 0; }) 52 + # define WARN_ON_FPU(x) ({ (void)(x); 0; }) 53 53 #endif 54 54 55 55 /*