mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Augusto Mecking Caringi <augustocaringi@gmail.com>
To: Tony Luck <tony.luck@intel.com>
Cc: Augusto Mecking Caringi <augustocaringi@gmail.com>,
	Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC
Date: Thu, 29 Dec 2016 15:28:49 +0000	[thread overview]
Message-ID: <1483025343-28932-1-git-send-email-augustocaringi@gmail.com> (raw)

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

             reply	other threads:[~2016-12-29 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-29 15:28 Augusto Mecking Caringi [this message]
2016-12-29 16:21 ` Boris Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483025343-28932-1-git-send-email-augustocaringi@gmail.com \
    --to=augustocaringi@gmail.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®