diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2012-03-23 18:01:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:32 -0400 |
| commit | 4501980aae221ed8120dee3491f799ecd75187ad (patch) | |
| tree | e3b28edb5e0700d3026d9e52f696f677ce712299 /kernel | |
| parent | 7a05c0f7bbae91d08b7d0acf016fdb42dbc912ae (diff) | |
kernel/watchdog.c: convert to pr_foo()
It fixes some 80-col wordwrappings and adds some consistency.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/watchdog.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 203fc6e1a285..a01cb03b045a 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | * to those contributors as well. | 9 | * to those contributors as well. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #define pr_fmt(fmt) "NMI watchdog: " fmt | ||
| 13 | |||
| 12 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
| 13 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
| 14 | #include <linux/nmi.h> | 16 | #include <linux/nmi.h> |
| @@ -373,18 +375,20 @@ static int watchdog_nmi_enable(int cpu) | |||
| 373 | /* Try to register using hardware perf events */ | 375 | /* Try to register using hardware perf events */ |
| 374 | event = perf_event_create_kernel_counter(wd_attr, cpu, NULL, watchdog_overflow_callback, NULL); | 376 | event = perf_event_create_kernel_counter(wd_attr, cpu, NULL, watchdog_overflow_callback, NULL); |
| 375 | if (!IS_ERR(event)) { | 377 | if (!IS_ERR(event)) { |
| 376 | printk(KERN_INFO "NMI watchdog enabled, takes one hw-pmu counter.\n"); | 378 | pr_info("enabled, takes one hw-pmu counter.\n"); |
| 377 | goto out_save; | 379 | goto out_save; |
| 378 | } | 380 | } |
| 379 | 381 | ||
| 380 | 382 | ||
| 381 | /* vary the KERN level based on the returned errno */ | 383 | /* vary the KERN level based on the returned errno */ |
| 382 | if (PTR_ERR(event) == -EOPNOTSUPP) | 384 | if (PTR_ERR(event) == -EOPNOTSUPP) |
| 383 | printk(KERN_INFO "NMI watchdog disabled (cpu%i): not supported (no LAPIC?)\n", cpu); | 385 | pr_info("disabled (cpu%i): not supported (no LAPIC?)\n", cpu); |
| 384 | else if (PTR_ERR(event) == -ENOENT) | 386 | else if (PTR_ERR(event) == -ENOENT) |
| 385 | printk(KERN_WARNING "NMI watchdog disabled (cpu%i): hardware events not enabled\n", cpu); | 387 | pr_warning("disabled (cpu%i): hardware events not enabled\n", |
| 388 | cpu); | ||
| 386 | else | 389 | else |
| 387 | printk(KERN_ERR "NMI watchdog disabled (cpu%i): unable to create perf event: %ld\n", cpu, PTR_ERR(event)); | 390 | pr_err("disabled (cpu%i): unable to create perf event: %ld\n", |
| 391 | cpu, PTR_ERR(event)); | ||
| 388 | return PTR_ERR(event); | 392 | return PTR_ERR(event); |
| 389 | 393 | ||
| 390 | /* success path */ | 394 | /* success path */ |
| @@ -439,7 +443,7 @@ static int watchdog_enable(int cpu) | |||
| 439 | struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; | 443 | struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; |
| 440 | p = kthread_create_on_node(watchdog, NULL, cpu_to_node(cpu), "watchdog/%d", cpu); | 444 | p = kthread_create_on_node(watchdog, NULL, cpu_to_node(cpu), "watchdog/%d", cpu); |
| 441 | if (IS_ERR(p)) { | 445 | if (IS_ERR(p)) { |
| 442 | printk(KERN_ERR "softlockup watchdog for %i failed\n", cpu); | 446 | pr_err("softlockup watchdog for %i failed\n", cpu); |
| 443 | if (!err) { | 447 | if (!err) { |
| 444 | /* if hardlockup hasn't already set this */ | 448 | /* if hardlockup hasn't already set this */ |
| 445 | err = PTR_ERR(p); | 449 | err = PTR_ERR(p); |
| @@ -495,7 +499,7 @@ static void watchdog_enable_all_cpus(void) | |||
| 495 | watchdog_enabled = 1; | 499 | watchdog_enabled = 1; |
| 496 | 500 | ||
| 497 | if (!watchdog_enabled) | 501 | if (!watchdog_enabled) |
| 498 | printk(KERN_ERR "watchdog: failed to be enabled on some cpus\n"); | 502 | pr_err("failed to be enabled on some cpus\n"); |
| 499 | 503 | ||
| 500 | } | 504 | } |
| 501 | 505 | ||
