diff options
author | Mike Travis <travis@sgi.com> | 2014-01-14 11:25:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-25 02:55:10 -0500 |
commit | 74c93f9d39b556ff9ac2340d568ad5caf8446c65 (patch) | |
tree | 0f2c0ae5687b675fc4d1d33cb3cb1d33535714cd /arch/x86/platform | |
parent | fc8b13740b2978b34872650cc8e928392e3758aa (diff) |
x86/uv/nmi: Fix Sparse warnings
Make uv_register_nmi_notifier() and uv_handle_nmi_ping() static
to address sparse warnings.
Fix problem where uv_nmi_kexec_failed is unused when
CONFIG_KEXEC is not defined.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Hedi Berriche <hedi@sgi.com>
Cc: Russ Anderson <rja@sgi.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Link: http://lkml.kernel.org/r/20140114162551.480872353@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/platform')
-rw-r--r-- | arch/x86/platform/uv/uv_nmi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c index 7486c21cbf0a..3a3c425275a0 100644 --- a/arch/x86/platform/uv/uv_nmi.c +++ b/arch/x86/platform/uv/uv_nmi.c | |||
@@ -74,7 +74,6 @@ static atomic_t uv_in_nmi; | |||
74 | static atomic_t uv_nmi_cpu = ATOMIC_INIT(-1); | 74 | static atomic_t uv_nmi_cpu = ATOMIC_INIT(-1); |
75 | static atomic_t uv_nmi_cpus_in_nmi = ATOMIC_INIT(-1); | 75 | static atomic_t uv_nmi_cpus_in_nmi = ATOMIC_INIT(-1); |
76 | static atomic_t uv_nmi_slave_continue; | 76 | static atomic_t uv_nmi_slave_continue; |
77 | static atomic_t uv_nmi_kexec_failed; | ||
78 | static cpumask_var_t uv_nmi_cpu_mask; | 77 | static cpumask_var_t uv_nmi_cpu_mask; |
79 | 78 | ||
80 | /* Values for uv_nmi_slave_continue */ | 79 | /* Values for uv_nmi_slave_continue */ |
@@ -504,6 +503,7 @@ static void uv_nmi_touch_watchdogs(void) | |||
504 | } | 503 | } |
505 | 504 | ||
506 | #if defined(CONFIG_KEXEC) | 505 | #if defined(CONFIG_KEXEC) |
506 | static atomic_t uv_nmi_kexec_failed; | ||
507 | static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs) | 507 | static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs) |
508 | { | 508 | { |
509 | /* Call crash to dump system state */ | 509 | /* Call crash to dump system state */ |
@@ -634,7 +634,7 @@ int uv_handle_nmi(unsigned int reason, struct pt_regs *regs) | |||
634 | /* | 634 | /* |
635 | * NMI handler for pulling in CPUs when perf events are grabbing our NMI | 635 | * NMI handler for pulling in CPUs when perf events are grabbing our NMI |
636 | */ | 636 | */ |
637 | int uv_handle_nmi_ping(unsigned int reason, struct pt_regs *regs) | 637 | static int uv_handle_nmi_ping(unsigned int reason, struct pt_regs *regs) |
638 | { | 638 | { |
639 | int ret; | 639 | int ret; |
640 | 640 | ||
@@ -651,7 +651,7 @@ int uv_handle_nmi_ping(unsigned int reason, struct pt_regs *regs) | |||
651 | return ret; | 651 | return ret; |
652 | } | 652 | } |
653 | 653 | ||
654 | void uv_register_nmi_notifier(void) | 654 | static void uv_register_nmi_notifier(void) |
655 | { | 655 | { |
656 | if (register_nmi_handler(NMI_UNKNOWN, uv_handle_nmi, 0, "uv")) | 656 | if (register_nmi_handler(NMI_UNKNOWN, uv_handle_nmi, 0, "uv")) |
657 | pr_warn("UV: NMI handler failed to register\n"); | 657 | pr_warn("UV: NMI handler failed to register\n"); |
@@ -695,6 +695,5 @@ void uv_nmi_setup(void) | |||
695 | uv_hub_nmi_per(cpu) = uv_hub_nmi_list[nid]; | 695 | uv_hub_nmi_per(cpu) = uv_hub_nmi_list[nid]; |
696 | } | 696 | } |
697 | BUG_ON(!alloc_cpumask_var(&uv_nmi_cpu_mask, GFP_KERNEL)); | 697 | BUG_ON(!alloc_cpumask_var(&uv_nmi_cpu_mask, GFP_KERNEL)); |
698 | uv_register_nmi_notifier(); | ||
698 | } | 699 | } |
699 | |||
700 | |||