From: Dave Jones <davej@redhat.com>
To: Andi Kleen <ak@suse.de>
Cc: patches@x86-64.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [12/45] i386: Fix arch/i386/kernel/nmi.c - 'unknown_nmi_panic_callback' declared 'static' but never defined warning
Date: Fri, 21 Sep 2007 17:08:20 -0400 [thread overview]
Message-ID: <20070921210820.GB8127@redhat.com> (raw)
In-Reply-To: <20070921204453.A6E6D14F09@wotan.suse.de>
On Fri, Sep 21, 2007 at 10:44:53PM +0200, Andi Kleen wrote:
>
> I get this warning when CONFIG_SYSCTL is not set :
>
> ...
>
> arch/i386/kernel/nmi.c:52: warning: 'unknown_nmi_panic_callback' declared 'static' but never defined
If you move the function call after the declaration, you can do without
both the prototype, and the ifdef.
Signed-off-by: Dave Jones <davej@redhat.com>
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index c7227e2..9a8ff0b 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -48,9 +48,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
@@ -389,15 +386,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)
@@ -451,6 +439,16 @@ 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;
--
http://www.codemonkey.org.uk
next prev parent reply other threads:[~2007-09-21 21:08 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-21 20:44 [PATCH] [0/45] x86 2.6.24 patches review I Andi Kleen
2007-09-21 20:44 ` [PATCH] [1/45] x86: misc. constifications Andi Kleen
2007-09-21 20:44 ` [PATCH] [2/45] x86: constify stacktrace_ops Andi Kleen
2007-09-21 20:44 ` [PATCH] [3/45] x86: Separate checking of unsynchronized and unstable TSC Andi Kleen
2007-09-21 20:44 ` [PATCH] [4/45] i386: Rewrite sched_clock Andi Kleen
2007-09-21 20:44 ` [PATCH] [5/45] x86_64: Use new shared sched_clock in x86-64 too Andi Kleen
2007-09-21 20:44 ` [PATCH] [6/45] x86: Unify i386 and x86-64 early quirks Andi Kleen
2007-09-21 20:44 ` [PATCH] [7/45] x86_64: Replace nvidia timer override quirk with pci id list and unify quirks Andi Kleen
2007-09-21 20:44 ` [PATCH] [8/45] x86_64: Use string instruction memcpy on AMD Fam11h Andi Kleen
2007-09-22 9:29 ` Jan Engelhardt
2007-09-21 20:44 ` [PATCH] [9/45] i386: Clean up duplicate includes in arch/i386/kernel/ Andi Kleen
2007-09-21 20:44 ` [PATCH] [10/45] x86_64: x86_64 Sanitize user specified e820 memmap values Andi Kleen
2007-09-21 20:44 ` [PATCH] [11/45] x86_64: Remove rogue default m in drivers/video/Kconfig Andi Kleen
2007-09-22 3:15 ` Len Brown
2007-09-21 20:44 ` [PATCH] [12/45] i386: Fix arch/i386/kernel/nmi.c - 'unknown_nmi_panic_callback' declared 'static' but never defined warning Andi Kleen
2007-09-21 21:08 ` Dave Jones [this message]
2007-09-21 20:44 ` [PATCH] [13/45] x86_64: Increase VDSO_TEXT_OFFSET for ancient binutils Andi Kleen
2007-11-14 0:21 ` CaT
2007-11-14 0:25 ` Andi Kleen
2007-09-21 20:44 ` [PATCH] [14/45] x86: Create clflush() inline, remove hardcoded wbinvd Andi Kleen
2007-09-21 20:44 ` [PATCH] [15/45] i386: i386 add AMD64 Barcelona PMU MSR definitions to msr.h Andi Kleen
2007-09-21 20:44 ` [PATCH] [16/45] i386: do not BUG_ON() when MSR is unknown Andi Kleen
2007-09-21 20:44 ` [PATCH] [17/45] i386: make Oprofile call shutdown() only once per session Andi Kleen
2007-09-21 20:44 ` [PATCH] [18/45] x86_64: 0 -> NULL, for arch/x86_64 Andi Kleen
2007-09-21 20:45 ` [PATCH] [19/45] x86_64: Always accumulate compiler options in CFLAGS Andi Kleen
2007-09-21 20:45 ` [PATCH] [20/45] x86_64: Use 8 byte stack alignment when possible Andi Kleen
2007-09-21 21:13 ` Dave Jones
2007-09-21 22:34 ` Andi Kleen
2007-09-21 22:52 ` Dave Jones
2007-09-21 21:19 ` Jakub Jelinek
2007-09-30 22:07 ` Andi Kleen
2007-09-21 20:45 ` [PATCH] [21/45] x86_64: Some cleanups for pci gart code Andi Kleen
2007-09-21 20:45 ` [PATCH] [22/45] x86_64: Enable iommu_merge by default Andi Kleen
2007-09-21 20:45 ` [PATCH] [23/45] i386: Make callgraph use dump_trace() on i386/x86_64 Andi Kleen
2007-09-21 20:45 ` [PATCH] [24/45] x86: Introduce frame_pointer() and stack_pointer() Andi Kleen
2007-09-22 9:26 ` Christoph Hellwig
2007-10-01 16:48 ` Andi Kleen
2007-09-21 20:45 ` [PATCH] [25/45] x86_64: remove sync_Arb_IDs Andi Kleen
2007-09-21 20:45 ` [PATCH] [26/45] x86_64: clear IO_APIC before enabing apic error vector Andi Kleen
2007-09-21 20:45 ` [PATCH] [27/45] x86_64: convert mm_context_t semaphore to a mutex Andi Kleen
2007-09-21 20:45 ` [PATCH] [28/45] x86_64: clean up apicid_to_node declaration Andi Kleen
2007-09-21 20:45 ` [PATCH] [29/45] i386: Consolidate show_regs and show_registers for i386 Andi Kleen
2007-09-21 20:45 ` [PATCH] [30/45] i386: Remove local CPU logic in MTRR call to smp_call_function_single Andi Kleen
2007-09-21 20:45 ` [PATCH] [31/45] i386: make struct apic_probe static Andi Kleen
2007-09-21 20:45 ` [PATCH] [32/45] x86_64: hide cond_syscall behind __KERNEL__ Andi Kleen
2007-09-22 9:30 ` Christoph Hellwig
2007-09-21 20:45 ` [PATCH] [33/45] i386: es7000 minor cleanups Andi Kleen
2007-09-21 20:45 ` [PATCH] [34/45] i386: no need to make enable_cpu_hotplug a variable Andi Kleen
2007-09-21 20:45 ` [PATCH] [35/45] i386: make some variables static Andi Kleen
2007-09-21 20:45 ` [PATCH] [36/45] x86_64: kmalloc + memset conversion to kzalloc Andi Kleen
2007-09-21 20:45 ` [PATCH] [37/45] i386: remove -maccumulate-outgoing-args Andi Kleen
2007-09-21 20:45 ` [PATCH] [38/45] i386: setup_trampoline() must be __cpuinit Andi Kleen
2007-09-21 20:45 ` [PATCH] [39/45] x86_64: block irq balancing for timer Andi Kleen
2007-09-21 20:45 ` [PATCH] [40/45] i386: deactivate the test for the dead CONFIG_DEBUG_PAGE_TYPE Andi Kleen
2007-09-21 20:45 ` [PATCH] [41/45] i386: remove unnecessary code Andi Kleen
2007-09-21 20:45 ` [PATCH] [42/45] x86_64: use descriptor's functions instead of inline assembly Andi Kleen
2007-09-21 20:45 ` [PATCH] [43/45] i386: Clean up duplicate includes in arch/i386/xen/ Andi Kleen
2007-09-21 20:45 ` [PATCH] [44/45] i386: simplify smp_call_function_single() call sequence in cpuid Andi Kleen
2007-09-21 20:45 ` [PATCH] [45/45] i386: simplify smp_call_function_single() call sequence Andi Kleen
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=20070921210820.GB8127@redhat.com \
--to=davej@redhat.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@x86-64.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