Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1548112 > unrolled thread
| Started by | Augusto Mecking Caringi <augustocaringi@gmail.com> |
|---|---|
| First post | 2016-12-29 16:30 +0100 |
| Last post | 2016-12-29 17:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC Augusto Mecking Caringi <augustocaringi@gmail.com> - 2016-12-29 16:30 +0100
Re: [PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC Boris Petkov <bp@alien8.de> - 2016-12-29 17:30 +0100
| From | Augusto Mecking Caringi <augustocaringi@gmail.com> |
|---|---|
| Date | 2016-12-29 16:30 +0100 |
| Subject | [PATCH] x86: mce: Fix build warning when !CONFIG_X86_LOCAL_APIC |
| Message-ID | <sTKOt-8iW-5@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Boris Petkov <bp@alien8.de> |
|---|---|
| Date | 2016-12-29 17:30 +0100 |
| Message-ID | <sTLKy-tS-33@gated-at.bofh.it> |
| In reply to | #1548112 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web