Skip to contentSkip to conversation

x86/mce/therm_throt: mark throttle_active_work as __maybe_unused

PATCH Applied Arnd Bergmann 3 participants 4 messages Dec 10, 2019 – Dec 17, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 arch/x86/kernel/cpu/mce/therm_throt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/mce/therm_throt.c +1 -1
index b38010b541d6..8963493a1e9e 100644
@@ -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);
Signature · 1 line
2.20.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Arnd Bergmann

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")

Quoted 22 lines
---
 arch/x86/kernel/cpu/mce/therm_throt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/mce/therm_throt.c +1 -1
index b38010b541d6..8963493a1e9e 100644
@@ -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);

merge bot Applied
#2 lore raw

[tip: ras/core] x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused

In reply to Arnd Bergmann
The following commit has been merged into the ras/core branch of tip:

The following commit has been merged into the ras/core branch of tip:

Commit-ID:     30357ea370345133949dbba199e8a5137a2b419c
Gitweb:        https://git.kernel.org/tip/30357ea370345133949dbba199e8a5137a2b419c
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Tue, 10 Dec 2019 21:39:13 +01:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Wed, 11 Dec 2019 19:54:29 +01:00

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")
Cc Greg Kroah-Hartman <[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]>
---
 arch/x86/kernel/cpu/mce/therm_throt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/mce/therm_throt.c +1 -1
index b38010b..8963493 100644
@@ -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);
merge bot Applied
#3 lore raw

[tip: ras/core] x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused

In reply to Arnd Bergmann
The following commit has been merged into the ras/core branch of tip:

The following commit has been merged into the ras/core branch of tip:

Commit-ID:     db1ae0314f47e88ae06679270adf17ffa245afd4
Gitweb:        https://git.kernel.org/tip/db1ae0314f47e88ae06679270adf17ffa245afd4
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Tue, 10 Dec 2019 21:39:13 +01:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Tue, 17 Dec 2019 10:26:28 +01:00

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")
Cc Greg Kroah-Hartman <[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]>
---
 arch/x86/kernel/cpu/mce/therm_throt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/mce/therm_throt.c +1 -1
index b38010b..8963493 100644
@@ -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);