diff options
author | Michal Hocko <mhocko@suse.cz> | 2015-02-11 18:26:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 20:06:03 -0500 |
commit | 401e4a7cf67d993bae02efdf1a234d7e2dbd2df2 (patch) | |
tree | 985dcda5d2932114a0a7e5a75427b63a367fb7bf | |
parent | 35536ae170f01fb7e5ca032d5324d03e9e5a36bd (diff) |
sysrq: convert printk to pr_* equivalent
While touching this area let's convert printk to pr_*. This also makes
the printing of continuation lines done properly.
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/tty/sysrq.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 42bad18c66c9..0071469ecbf1 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c | |||
@@ -90,7 +90,7 @@ static void sysrq_handle_loglevel(int key) | |||
90 | 90 | ||
91 | i = key - '0'; | 91 | i = key - '0'; |
92 | console_loglevel = CONSOLE_LOGLEVEL_DEFAULT; | 92 | console_loglevel = CONSOLE_LOGLEVEL_DEFAULT; |
93 | printk("Loglevel set to %d\n", i); | 93 | pr_info("Loglevel set to %d\n", i); |
94 | console_loglevel = i; | 94 | console_loglevel = i; |
95 | } | 95 | } |
96 | static struct sysrq_key_op sysrq_loglevel_op = { | 96 | static struct sysrq_key_op sysrq_loglevel_op = { |
@@ -220,7 +220,7 @@ static void showacpu(void *dummy) | |||
220 | return; | 220 | return; |
221 | 221 | ||
222 | spin_lock_irqsave(&show_lock, flags); | 222 | spin_lock_irqsave(&show_lock, flags); |
223 | printk(KERN_INFO "CPU%d:\n", smp_processor_id()); | 223 | pr_info("CPU%d:\n", smp_processor_id()); |
224 | show_stack(NULL, NULL); | 224 | show_stack(NULL, NULL); |
225 | spin_unlock_irqrestore(&show_lock, flags); | 225 | spin_unlock_irqrestore(&show_lock, flags); |
226 | } | 226 | } |
@@ -243,7 +243,7 @@ static void sysrq_handle_showallcpus(int key) | |||
243 | struct pt_regs *regs = get_irq_regs(); | 243 | struct pt_regs *regs = get_irq_regs(); |
244 | 244 | ||
245 | if (regs) { | 245 | if (regs) { |
246 | printk(KERN_INFO "CPU%d:\n", smp_processor_id()); | 246 | pr_info("CPU%d:\n", smp_processor_id()); |
247 | show_regs(regs); | 247 | show_regs(regs); |
248 | } | 248 | } |
249 | schedule_work(&sysrq_showallcpus); | 249 | schedule_work(&sysrq_showallcpus); |
@@ -522,7 +522,7 @@ void __handle_sysrq(int key, bool check_mask) | |||
522 | */ | 522 | */ |
523 | orig_log_level = console_loglevel; | 523 | orig_log_level = console_loglevel; |
524 | console_loglevel = CONSOLE_LOGLEVEL_DEFAULT; | 524 | console_loglevel = CONSOLE_LOGLEVEL_DEFAULT; |
525 | printk(KERN_INFO "SysRq : "); | 525 | pr_info("SysRq : "); |
526 | 526 | ||
527 | op_p = __sysrq_get_key_op(key); | 527 | op_p = __sysrq_get_key_op(key); |
528 | if (op_p) { | 528 | if (op_p) { |
@@ -531,14 +531,14 @@ void __handle_sysrq(int key, bool check_mask) | |||
531 | * should not) and is the invoked operation enabled? | 531 | * should not) and is the invoked operation enabled? |
532 | */ | 532 | */ |
533 | if (!check_mask || sysrq_on_mask(op_p->enable_mask)) { | 533 | if (!check_mask || sysrq_on_mask(op_p->enable_mask)) { |
534 | printk("%s\n", op_p->action_msg); | 534 | pr_cont("%s\n", op_p->action_msg); |
535 | console_loglevel = orig_log_level; | 535 | console_loglevel = orig_log_level; |
536 | op_p->handler(key); | 536 | op_p->handler(key); |
537 | } else { | 537 | } else { |
538 | printk("This sysrq operation is disabled.\n"); | 538 | pr_cont("This sysrq operation is disabled.\n"); |
539 | } | 539 | } |
540 | } else { | 540 | } else { |
541 | printk("HELP : "); | 541 | pr_cont("HELP : "); |
542 | /* Only print the help msg once per handler */ | 542 | /* Only print the help msg once per handler */ |
543 | for (i = 0; i < ARRAY_SIZE(sysrq_key_table); i++) { | 543 | for (i = 0; i < ARRAY_SIZE(sysrq_key_table); i++) { |
544 | if (sysrq_key_table[i]) { | 544 | if (sysrq_key_table[i]) { |
@@ -549,10 +549,10 @@ void __handle_sysrq(int key, bool check_mask) | |||
549 | ; | 549 | ; |
550 | if (j != i) | 550 | if (j != i) |
551 | continue; | 551 | continue; |
552 | printk("%s ", sysrq_key_table[i]->help_msg); | 552 | pr_cont("%s ", sysrq_key_table[i]->help_msg); |
553 | } | 553 | } |
554 | } | 554 | } |
555 | printk("\n"); | 555 | pr_cont("\n"); |
556 | console_loglevel = orig_log_level; | 556 | console_loglevel = orig_log_level; |
557 | } | 557 | } |
558 | rcu_read_unlock(); | 558 | rcu_read_unlock(); |