Linux-EDAC Archive on
 help / color / Atom feed
* [PATCH 5.5 147/399] x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused
       [not found] <>
@ 2020-02-21  7:37 ` Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2020-02-21  7:37 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Borislav Petkov,
	Srinivas Pandruvada, bberg, ckellner, hdegoede, H. Peter Anvin,
	Ingo Molnar, linux-edac, Thomas Gleixner, Tony Luck, x86-ml,
	Sasha Levin

From: Arnd Bergmann <>

[ Upstream commit db1ae0314f47e88ae06679270adf17ffa245afd4 ]

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: Greg Kroah-Hartman <>
Cc: "H. Peter Anvin" <>
Cc: Ingo Molnar <>
Cc: linux-edac <>
Cc: Thomas Gleixner <>
Cc: Tony Luck <>
Cc: x86-ml <>
Signed-off-by: Sasha Levin <>
 arch/x86/kernel/cpu/mce/therm_throt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mce/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c
index 6c3e1c92f1835..58b4ee3cda777 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2020-02-21  7:37 ` [PATCH 5.5 147/399] x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused Greg Kroah-Hartman

Linux-EDAC Archive on

Archives are clonable:
	git clone --mirror linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ \
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone