Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] x86/mce/therm_throt: mark throttle_active_work as __maybe_unused
@ 2019-12-10 20:39 Arnd Bergmann
  2019-12-11 18:26 ` Srinivas Pandruvada
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-12-10 20:39 UTC (permalink / raw)
  To: Tony Luck, Borislav Petkov, Thomas Gleixner, Ingo Molnar, x86,
	Srinivas Pandruvada
  Cc: Arnd Bergmann, H. Peter Anvin, bberg, ckellner, hdegoede,
	linux-edac, Greg Kroah-Hartman, linux-kernel

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 <arnd@arndb.de>
---
 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 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);
-- 
2.20.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/mce/therm_throt: mark throttle_active_work as __maybe_unused
  2019-12-10 20:39 [PATCH] x86/mce/therm_throt: mark throttle_active_work as __maybe_unused Arnd Bergmann
@ 2019-12-11 18:26 ` Srinivas Pandruvada
  2019-12-11 19:02 ` [tip: ras/core] x86/mce/therm_throt: Mark throttle_active_work() " tip-bot2 for Arnd Bergmann
  2019-12-17 10:01 ` tip-bot2 for Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: Srinivas Pandruvada @ 2019-12-11 18:26 UTC (permalink / raw)
  To: Arnd Bergmann, Tony Luck, Borislav Petkov, Thomas Gleixner,
	Ingo Molnar, x86
  Cc: H. Peter Anvin, bberg, ckellner, hdegoede, linux-edac,
	Greg Kroah-Hartman, linux-kernel

On Tue, 2019-12-10 at 21:39 +0100, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: ras/core] x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused
  2019-12-10 20:39 [PATCH] x86/mce/therm_throt: mark throttle_active_work as __maybe_unused Arnd Bergmann
  2019-12-11 18:26 ` Srinivas Pandruvada
@ 2019-12-11 19:02 ` " tip-bot2 for Arnd Bergmann
  2019-12-17 10:01 ` tip-bot2 for Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2019-12-11 19:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Arnd Bergmann, Borislav Petkov, Srinivas Pandruvada, bberg,
	ckellner, Greg Kroah-Hartman, hdegoede, H. Peter Anvin,
	Ingo Molnar, linux-edac, Thomas Gleixner, Tony Luck, x86-ml,
	LKML

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 <arnd@arndb.de>
AuthorDate:    Tue, 10 Dec 2019 21:39:13 +01:00
Committer:     Borislav Petkov <bp@suse.de>
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: bberg@redhat.com
Cc: ckellner@redhat.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: hdegoede@redhat.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20191210203925.3119091-1-arnd@arndb.de
---
 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 b38010b..8963493 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] 4+ messages in thread

* [tip: ras/core] x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused
  2019-12-10 20:39 [PATCH] x86/mce/therm_throt: mark throttle_active_work as __maybe_unused Arnd Bergmann
  2019-12-11 18:26 ` Srinivas Pandruvada
  2019-12-11 19:02 ` [tip: ras/core] x86/mce/therm_throt: Mark throttle_active_work() " tip-bot2 for Arnd Bergmann
@ 2019-12-17 10:01 ` tip-bot2 for Arnd Bergmann
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2019-12-17 10:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Arnd Bergmann, Borislav Petkov, Srinivas Pandruvada, bberg,
	ckellner, Greg Kroah-Hartman, hdegoede, H. Peter Anvin,
	Ingo Molnar, linux-edac, Thomas Gleixner, Tony Luck, x86-ml,
	LKML

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 <arnd@arndb.de>
AuthorDate:    Tue, 10 Dec 2019 21:39:13 +01:00
Committer:     Borislav Petkov <bp@suse.de>
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: bberg@redhat.com
Cc: ckellner@redhat.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: hdegoede@redhat.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20191210203925.3119091-1-arnd@arndb.de
---
 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 b38010b..8963493 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] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 20:39 [PATCH] x86/mce/therm_throt: mark throttle_active_work as __maybe_unused Arnd Bergmann
2019-12-11 18:26 ` Srinivas Pandruvada
2019-12-11 19:02 ` [tip: ras/core] x86/mce/therm_throt: Mark throttle_active_work() " tip-bot2 for Arnd Bergmann
2019-12-17 10:01 ` tip-bot2 for Arnd Bergmann

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 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/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git