aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-05-23 23:43:18 -0400
committerIngo Molnar <mingo@elte.hu>2011-05-23 23:53:39 -0400
commit6e9101aeec39961308176e0f59e73ac5d37d243a (patch)
tree7747bc5884e9e663492e53efaa15ff1f873e7d90 /kernel/watchdog.c
parent0f61f3e4db71946292ef8d6d6df74b8fcf001646 (diff)
watchdog: Fix non-standard prototype of get_softlockup_thresh()
This build warning slipped through: kernel/watchdog.c:102: warning: function declaration isn't a prototype As reported by Stephen Rothwell. Also address an unused variable warning that GCC 4.6.0 reports: we cannot do anything about failed watchdog ops during CPU hotplug (it's not serious enough to return an error from the notifier), so ignore them. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Mandeep Singh Baines <msb@chromium.org> Cc: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/20110524134129.8da27016.sfr@canb.auug.org.au Signed-off-by: Ingo Molnar <mingo@elte.hu> LKML-Reference: <20110517071642.GF22305@elte.hu>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 6e63097fa73a..3d0c56ad4792 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -98,7 +98,7 @@ __setup("nosoftlockup", nosoftlockup_setup);
98 * the thresholds with a factor: we make the soft threshold twice the amount of 98 * the thresholds with a factor: we make the soft threshold twice the amount of
99 * time the hard threshold is. 99 * time the hard threshold is.
100 */ 100 */
101static int get_softlockup_thresh() 101static int get_softlockup_thresh(void)
102{ 102{
103 return watchdog_thresh * 2; 103 return watchdog_thresh * 2;
104} 104}
@@ -415,15 +415,13 @@ static void watchdog_nmi_disable(int cpu) { return; }
415#endif /* CONFIG_HARDLOCKUP_DETECTOR */ 415#endif /* CONFIG_HARDLOCKUP_DETECTOR */
416 416
417/* prepare/enable/disable routines */ 417/* prepare/enable/disable routines */
418static int watchdog_prepare_cpu(int cpu) 418static void watchdog_prepare_cpu(int cpu)
419{ 419{
420 struct hrtimer *hrtimer = &per_cpu(watchdog_hrtimer, cpu); 420 struct hrtimer *hrtimer = &per_cpu(watchdog_hrtimer, cpu);
421 421
422 WARN_ON(per_cpu(softlockup_watchdog, cpu)); 422 WARN_ON(per_cpu(softlockup_watchdog, cpu));
423 hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 423 hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
424 hrtimer->function = watchdog_timer_fn; 424 hrtimer->function = watchdog_timer_fn;
425
426 return 0;
427} 425}
428 426
429static int watchdog_enable(int cpu) 427static int watchdog_enable(int cpu)
@@ -542,17 +540,16 @@ static int __cpuinit
542cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) 540cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
543{ 541{
544 int hotcpu = (unsigned long)hcpu; 542 int hotcpu = (unsigned long)hcpu;
545 int err = 0;
546 543
547 switch (action) { 544 switch (action) {
548 case CPU_UP_PREPARE: 545 case CPU_UP_PREPARE:
549 case CPU_UP_PREPARE_FROZEN: 546 case CPU_UP_PREPARE_FROZEN:
550 err = watchdog_prepare_cpu(hotcpu); 547 watchdog_prepare_cpu(hotcpu);
551 break; 548 break;
552 case CPU_ONLINE: 549 case CPU_ONLINE:
553 case CPU_ONLINE_FROZEN: 550 case CPU_ONLINE_FROZEN:
554 if (watchdog_enabled) 551 if (watchdog_enabled)
555 err = watchdog_enable(hotcpu); 552 watchdog_enable(hotcpu);
556 break; 553 break;
557#ifdef CONFIG_HOTPLUG_CPU 554#ifdef CONFIG_HOTPLUG_CPU
558 case CPU_UP_CANCELED: 555 case CPU_UP_CANCELED: