x86/mce: Fix -Wmissing-prototypes warnings
authorBorislav Petkov <bp@suse.de>
Fri, 9 Nov 2018 22:13:13 +0000 (23:13 +0100)
committerBorislav Petkov <bp@suse.de>
Wed, 14 Nov 2018 12:46:26 +0000 (13:46 +0100)
commit68b5e4326e4b8ac9080835005d8254fed0fb3c56
tree99e673d2a1b2ff9ae25ffac8ba2c31d5d5a09565
parent63ecd3b13d5cf07959a2315ec62a7c62e20df114
x86/mce: Fix -Wmissing-prototypes warnings

Add the proper includes and make smca_get_name() static.

Fix an actual bug too which the warning triggered:

  arch/x86/kernel/cpu/mcheck/therm_throt.c:395:39: error: conflicting \
  types for ‘smp_thermal_interrupt’
   asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r)
                                         ^~~~~~~~~~~~~~~~~~~~~
  In file included from arch/x86/kernel/cpu/mcheck/therm_throt.c:29:
  ./arch/x86/include/asm/traps.h:107:17: note: previous declaration of \
  ‘smp_thermal_interrupt’ was here
   asmlinkage void smp_thermal_interrupt(void);

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Yi Wang <wang.yi59@zte.com.cn>
Cc: Michael Matz <matz@suse.de>
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811081633160.1549@nanos.tec.linutronix.de
arch/x86/include/asm/traps.h
arch/x86/kernel/cpu/mcheck/mce_amd.c
arch/x86/kernel/cpu/mcheck/therm_throt.c
arch/x86/kernel/cpu/mcheck/threshold.c