diff options
author | Tejun Heo <htejun@gmail.com> | 2008-05-12 15:21:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-24 17:15:02 -0400 |
commit | 3b8945e8d40645eecdb7d2357ca531f9b4dd9f71 (patch) | |
tree | 7338d48670e07713b0f5d5236ee6f94644d6a9c8 /kernel/printk.c | |
parent | 42fdfa238a23643226910acf922ea930b3286032 (diff) |
printk: clean up recursion check related static variables
Make printk_recursion_bug_msg static and drop printk prefix from recursion
variables.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 55d16e57499a..8b42f87e311d 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -652,16 +652,14 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu) | |||
652 | spin_unlock(&logbuf_lock); | 652 | spin_unlock(&logbuf_lock); |
653 | return retval; | 653 | return retval; |
654 | } | 654 | } |
655 | 655 | static const char recursion_bug_msg [] = | |
656 | const char printk_recursion_bug_msg [] = | 656 | KERN_CRIT "BUG: recent printk recursion!\n"; |
657 | KERN_CRIT "BUG: recent printk recursion!\n"; | 657 | static int recursion_bug; |
658 | static int printk_recursion_bug; | 658 | static int log_level_unknown = 1; |
659 | static char printk_buf[1024]; | ||
659 | 660 | ||
660 | asmlinkage int vprintk(const char *fmt, va_list args) | 661 | asmlinkage int vprintk(const char *fmt, va_list args) |
661 | { | 662 | { |
662 | static int log_level_unknown = 1; | ||
663 | static char printk_buf[1024]; | ||
664 | |||
665 | unsigned long flags; | 663 | unsigned long flags; |
666 | int printed_len = 0; | 664 | int printed_len = 0; |
667 | int this_cpu; | 665 | int this_cpu; |
@@ -686,7 +684,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
686 | * it can be printed at the next appropriate moment: | 684 | * it can be printed at the next appropriate moment: |
687 | */ | 685 | */ |
688 | if (!oops_in_progress) { | 686 | if (!oops_in_progress) { |
689 | printk_recursion_bug = 1; | 687 | recursion_bug = 1; |
690 | goto out_restore_irqs; | 688 | goto out_restore_irqs; |
691 | } | 689 | } |
692 | zap_locks(); | 690 | zap_locks(); |
@@ -696,10 +694,10 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
696 | spin_lock(&logbuf_lock); | 694 | spin_lock(&logbuf_lock); |
697 | printk_cpu = this_cpu; | 695 | printk_cpu = this_cpu; |
698 | 696 | ||
699 | if (printk_recursion_bug) { | 697 | if (recursion_bug) { |
700 | printk_recursion_bug = 0; | 698 | recursion_bug = 0; |
701 | strcpy(printk_buf, printk_recursion_bug_msg); | 699 | strcpy(printk_buf, recursion_bug_msg); |
702 | printed_len = sizeof(printk_recursion_bug_msg); | 700 | printed_len = sizeof(recursion_bug_msg); |
703 | } | 701 | } |
704 | /* Emit the output into the temporary buffer */ | 702 | /* Emit the output into the temporary buffer */ |
705 | printed_len += vscnprintf(printk_buf + printed_len, | 703 | printed_len += vscnprintf(printk_buf + printed_len, |