Skip to content

Commit db1ae03

Browse files
arndbsuryasaimadhu
authored andcommitted
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: f665620 ("x86/mce/therm_throt: Optimize notifications of thermal throttle") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Srinivas Pandruvada <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: linux-edac <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 7de7de7 commit db1ae03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/mce/therm_throt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static void get_therm_status(int level, bool *proc_hot, u8 *temp)
235235
*temp = (msr_val >> 16) & 0x7F;
236236
}
237237

238-
static void throttle_active_work(struct work_struct *work)
238+
static void __maybe_unused throttle_active_work(struct work_struct *work)
239239
{
240240
struct _thermal_state *state = container_of(to_delayed_work(work),
241241
struct _thermal_state, therm_work);

0 commit comments

Comments
 (0)