From: Arnd Bergmann Date: Tue, 10 Dec 2019 20:39:13 +0000 (+0100) Subject: x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused X-Git-Tag: v5.6-rc1~203^2~11 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=db1ae0314f47e88ae06679270adf17ffa245afd4;p=linux.git x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused throttle_active_work() is only called if CONFIG_SYSFS is set, otherwise we get a harmless warning: arch/x86/kernel/cpu/mce/therm_throt.c:238:13: error: 'throttle_active_work' \ defined but not used [-Werror=unused-function] Mark the function as __maybe_unused to avoid the warning. Fixes: f6656208f04e ("x86/mce/therm_throt: Optimize notifications of thermal throttle") Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov Reviewed-by: Srinivas Pandruvada Cc: bberg@redhat.com Cc: ckellner@redhat.com Cc: Greg Kroah-Hartman Cc: hdegoede@redhat.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191210203925.3119091-1-arnd@arndb.de --- diff --git a/arch/x86/kernel/cpu/mce/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c index b38010b541d6..8963493a1e9e 100644 --- a/arch/x86/kernel/cpu/mce/therm_throt.c +++ b/arch/x86/kernel/cpu/mce/therm_throt.c @@ -235,7 +235,7 @@ static void get_therm_status(int level, bool *proc_hot, u8 *temp) *temp = (msr_val >> 16) & 0x7F; } -static void throttle_active_work(struct work_struct *work) +static void __maybe_unused throttle_active_work(struct work_struct *work) { struct _thermal_state *state = container_of(to_delayed_work(work), struct _thermal_state, therm_work);