mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC
@ 2016-12-29 15:28 Augusto Mecking Caringi
  2016-12-29 16:21 ` Boris Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Augusto Mecking Caringi @ 2016-12-29 15:28 UTC (permalink / raw)
  To: Tony Luck
  Cc: Augusto Mecking Caringi, Borislav Petkov, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, x86, linux-edac, linux-kernel

The mce_irq_ipi() function is only called inside a #ifdef
CONFIG_X86_LOCAL_APIC block, if this option is disabled gcc gives the
following build warning:

arch/x86/kernel/cpu/mcheck/mce-inject.c:97:13: warning: ‘mce_irq_ipi’
defined but not used [-Wunused-function]
static void mce_irq_ipi(void *info)
             ^

Fix it marking this function as __maybe_unused.

Signed-off-by: Augusto Mecking Caringi <augustocaringi@gmail.com>
---
 arch/x86/kernel/cpu/mcheck/mce-inject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index 517619e..cd1fb58 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -94,7 +94,7 @@ static int mce_raise_notify(unsigned int cmd, struct pt_regs *regs)
 	return NMI_HANDLED;
 }
 
-static void mce_irq_ipi(void *info)
+static void __maybe_unused mce_irq_ipi(void *info)
 {
 	int cpu = smp_processor_id();
 	struct mce *m = this_cpu_ptr(&injectm);
-- 
2.7.4

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

* Re: [PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC
  2016-12-29 15:28 [PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC Augusto Mecking Caringi
@ 2016-12-29 16:21 ` Boris Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Petkov @ 2016-12-29 16:21 UTC (permalink / raw)
  To: Augusto Mecking Caringi, Tony Luck
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-edac,
	linux-kernel

On December 29, 2016 5:28:49 PM GMT+02:00, Augusto Mecking Caringi <augustocaringi@gmail.com> wrote:
>The mce_irq_ipi() function is only called inside a #ifdef
>CONFIG_X86_LOCAL_APIC block, if this option is disabled gcc gives the
>following build warning:
>
>arch/x86/kernel/cpu/mcheck/mce-inject.c:97:13: warning: ‘mce_irq_ipi’
>defined but not used [-Wunused-function]
>static void mce_irq_ipi(void *info)
>             ^
>
>Fix it marking this function as __maybe_unused.
See http://lkml.kernel.org/r/20161218083748.GA1034@gmail.com
-- 
Sent from a small device: formatting sux and brevity is inevitable. 

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

end of thread, other threads:[~2016-12-29 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-29 15:28 [PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC Augusto Mecking Caringi
2016-12-29 16:21 ` Boris Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®