From: Thomas Gleixner <tglx@linutronix.de>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: fix compile warning building without CONFIG_SYSCTL
Date: Sun, 17 Feb 2008 14:56:22 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.1.00.0802171456070.7583@apollo.tec.linutronix.de> (raw)
In-Reply-To: <47A56FEE.9000900@cn.fujitsu.com>
On Sun, 3 Feb 2008, Li Zefan wrote:
> building without CONFIG_SYSCTL:
>
> arch/x86/kernel/nmi_64.c:50: warning: 'unknown_nmi_panic_callback' declared 'static' but never defined
>
> This patch also fixes nmi_32.c
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Applied. Thanks,
tglx
> ---
> arch/x86/kernel/nmi_32.c | 21 +++++++++------------
> arch/x86/kernel/nmi_64.c | 21 +++++++++------------
> 2 files changed, 18 insertions(+), 24 deletions(-)
>
> diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
> index edd4136..6a0aa70 100644
> --- a/arch/x86/kernel/nmi_32.c
> +++ b/arch/x86/kernel/nmi_32.c
> @@ -46,9 +46,6 @@ static unsigned int nmi_hz = HZ;
>
> static DEFINE_PER_CPU(short, wd_enabled);
>
> -/* local prototypes */
> -static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu);
> -
> static int endflag __initdata = 0;
>
> #ifdef CONFIG_SMP
> @@ -391,15 +388,6 @@ __kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
> return rc;
> }
>
> -int do_nmi_callback(struct pt_regs * regs, int cpu)
> -{
> -#ifdef CONFIG_SYSCTL
> - if (unknown_nmi_panic)
> - return unknown_nmi_panic_callback(regs, cpu);
> -#endif
> - return 0;
> -}
> -
> #ifdef CONFIG_SYSCTL
>
> static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
> @@ -453,6 +441,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
>
> #endif
>
> +int do_nmi_callback(struct pt_regs *regs, int cpu)
> +{
> +#ifdef CONFIG_SYSCTL
> + if (unknown_nmi_panic)
> + return unknown_nmi_panic_callback(regs, cpu);
> +#endif
> + return 0;
> +}
> +
> void __trigger_all_cpu_backtrace(void)
> {
> int i;
> diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c
> index fb99484..9a4fde7 100644
> --- a/arch/x86/kernel/nmi_64.c
> +++ b/arch/x86/kernel/nmi_64.c
> @@ -46,9 +46,6 @@ static unsigned int nmi_hz = HZ;
>
> static DEFINE_PER_CPU(short, wd_enabled);
>
> -/* local prototypes */
> -static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu);
> -
> /* Run after command line and cpu_init init, but before all other checks */
> void nmi_watchdog_default(void)
> {
> @@ -394,15 +391,6 @@ asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code)
> nmi_exit();
> }
>
> -int do_nmi_callback(struct pt_regs * regs, int cpu)
> -{
> -#ifdef CONFIG_SYSCTL
> - if (unknown_nmi_panic)
> - return unknown_nmi_panic_callback(regs, cpu);
> -#endif
> - return 0;
> -}
> -
> void stop_nmi(void)
> {
> acpi_nmi_disable();
> @@ -464,6 +452,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
>
> #endif
>
> +int do_nmi_callback(struct pt_regs *regs, int cpu)
> +{
> +#ifdef CONFIG_SYSCTL
> + if (unknown_nmi_panic)
> + return unknown_nmi_panic_callback(regs, cpu);
> +#endif
> + return 0;
> +}
> +
> void __trigger_all_cpu_backtrace(void)
> {
> int i;
> --
> 1.5.4.rc3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
prev parent reply other threads:[~2008-02-17 13:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-03 6:18 [PATCH] x86: fix compile waring " Li Zefan
2008-02-03 7:12 ` Ingo Molnar
2008-02-03 7:31 ` Li Zefan
2008-02-03 7:40 ` [PATCH] x86: fix compile warning " Li Zefan
2008-02-15 20:21 ` Ingo Molnar
2008-02-17 13:56 ` Thomas Gleixner [this message]
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=alpine.LFD.1.00.0802171456070.7583@apollo.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
/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®