From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, wang.yi59@zte.com.cn, bp@suse.de,
mingo@kernel.org, matz@suse.de, linux-kernel@vger.kernel.org,
tglx@linutronix.de
Subject: [tip:x86/cleanups] x86/mce: Fix -Wmissing-prototypes warnings
Date: Tue, 13 Nov 2018 06:21:55 -0800 [thread overview]
Message-ID: <tip-83a204daa40315a38204493f60768910c8604e9c@git.kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.21.1811081633160.1549@nanos.tec.linutronix.de>
Commit-ID: 83a204daa40315a38204493f60768910c8604e9c
Gitweb: https://git.kernel.org/tip/83a204daa40315a38204493f60768910c8604e9c
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Fri, 9 Nov 2018 23:13:13 +0100
Committer: Borislav Petkov <bp@suse.de>
CommitDate: Tue, 13 Nov 2018 14:55:08 +0100
x86/mce: Fix -Wmissing-prototypes warnings
Add the proper includes and make smca_get_name() static.
Fix an actual bug too which the warning triggered:
arch/x86/kernel/cpu/mcheck/therm_throt.c:395:39: error: conflicting \
types for ‘smp_thermal_interrupt’
asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r)
^~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/cpu/mcheck/therm_throt.c:29:
./arch/x86/include/asm/traps.h:107:17: note: previous declaration of \
‘smp_thermal_interrupt’ was here
asmlinkage void smp_thermal_interrupt(void);
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Yi Wang <wang.yi59@zte.com.cn>
Cc: Michael Matz <matz@suse.de>
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811081633160.1549@nanos.tec.linutronix.de
---
arch/x86/include/asm/traps.h | 6 +++---
arch/x86/kernel/cpu/mcheck/mce_amd.c | 5 +++--
arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 +
arch/x86/kernel/cpu/mcheck/threshold.c | 3 ++-
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index 3de69330e6c5..afbc87206886 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -104,9 +104,9 @@ extern int panic_on_unrecovered_nmi;
void math_emulate(struct math_emu_info *);
#ifndef CONFIG_X86_32
-asmlinkage void smp_thermal_interrupt(void);
-asmlinkage void smp_threshold_interrupt(void);
-asmlinkage void smp_deferred_error_interrupt(void);
+asmlinkage void smp_thermal_interrupt(struct pt_regs *regs);
+asmlinkage void smp_threshold_interrupt(struct pt_regs *regs);
+asmlinkage void smp_deferred_error_interrupt(struct pt_regs *regs);
#endif
extern void ist_enter(struct pt_regs *regs);
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index dd33c357548f..9c8e2daa48cd 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -23,6 +23,7 @@
#include <linux/string.h>
#include <asm/amd_nb.h>
+#include <asm/traps.h>
#include <asm/apic.h>
#include <asm/mce.h>
#include <asm/msr.h>
@@ -99,7 +100,7 @@ static u32 smca_bank_addrs[MAX_NR_BANKS][NR_BLOCKS] __ro_after_init =
[0 ... MAX_NR_BANKS - 1] = { [0 ... NR_BLOCKS - 1] = -1 }
};
-const char *smca_get_name(enum smca_bank_types t)
+static const char *smca_get_name(enum smca_bank_types t)
{
if (t >= N_SMCA_BANK_TYPES)
return NULL;
@@ -825,7 +826,7 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc)
mce_log(&m);
}
-asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(void)
+asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(struct pt_regs *regs)
{
entering_irq();
trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR);
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 2da67b70ba98..95a7cfa6de15 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -25,6 +25,7 @@
#include <linux/cpu.h>
#include <asm/processor.h>
+#include <asm/traps.h>
#include <asm/apic.h>
#include <asm/mce.h>
#include <asm/msr.h>
diff --git a/arch/x86/kernel/cpu/mcheck/threshold.c b/arch/x86/kernel/cpu/mcheck/threshold.c
index 2b584b319eff..c21e0a1efd0f 100644
--- a/arch/x86/kernel/cpu/mcheck/threshold.c
+++ b/arch/x86/kernel/cpu/mcheck/threshold.c
@@ -6,6 +6,7 @@
#include <linux/kernel.h>
#include <asm/irq_vectors.h>
+#include <asm/traps.h>
#include <asm/apic.h>
#include <asm/mce.h>
#include <asm/trace/irq_vectors.h>
@@ -18,7 +19,7 @@ static void default_threshold_interrupt(void)
void (*mce_threshold_vector)(void) = default_threshold_interrupt;
-asmlinkage __visible void __irq_entry smp_threshold_interrupt(void)
+asmlinkage __visible void __irq_entry smp_threshold_interrupt(struct pt_regs *regs)
{
entering_irq();
trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);
next prev parent reply other threads:[~2018-11-13 14:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 1:12 [PATCH v2] x86/cpu: fix prototype warning Yi Wang
2018-11-08 15:03 ` Borislav Petkov
2018-11-08 15:32 ` Borislav Petkov
2018-11-08 15:35 ` Thomas Gleixner
2018-11-08 15:41 ` Borislav Petkov
2018-11-09 16:07 ` David Laight
2018-11-10 10:51 ` [tip:ras/core] x86/mce: Fix -Wmissing-prototypes warnings tip-bot for Borislav Petkov
2018-11-10 14:16 ` Borislav Petkov
2018-11-12 5:24 ` Ingo Molnar
2018-11-12 12:19 ` Borislav Petkov
2018-11-13 14:22 ` [tip:x86/cleanups] x86/traps: Complete prototype declarations tip-bot for Borislav Petkov
2018-11-14 13:19 ` tip-bot for Borislav Petkov
2018-11-13 14:21 ` tip-bot for Borislav Petkov [this message]
2018-11-14 13:18 ` [tip:x86/cleanups] x86/mce: Fix -Wmissing-prototypes warnings tip-bot for Borislav Petkov
2018-11-08 15:47 ` [PATCH v2] x86/cpu: fix prototype warning Michael Matz
2018-11-08 17:22 ` Borislav Petkov
[not found] ` <201811090843126464658@zte.com.cn>
2018-11-09 10:55 ` Borislav Petkov
2018-11-09 11:12 ` Greg KH
2018-11-09 11:41 ` Borislav Petkov
2018-11-09 12:25 ` Greg KH
2018-11-09 22:17 ` Borislav 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=tip-83a204daa40315a38204493f60768910c8604e9c@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=matz@suse.de \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=wang.yi59@zte.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).