printk: clean up recursion check related static variables
Tejun Heo [Mon, 12 May 2008 19:21:04 +0000 (21:21 +0200)]
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>

kernel/printk.c

index 55d16e5..8b42f87 100644 (file)
@@ -652,16 +652,14 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu)
        spin_unlock(&logbuf_lock);
        return retval;
 }
-
-const char printk_recursion_bug_msg [] =
-                       KERN_CRIT "BUG: recent printk recursion!\n";
-static int printk_recursion_bug;
+static const char recursion_bug_msg [] =
+               KERN_CRIT "BUG: recent printk recursion!\n";
+static int recursion_bug;
+static int log_level_unknown = 1;
+static char printk_buf[1024];
 
 asmlinkage int vprintk(const char *fmt, va_list args)
 {
-       static int log_level_unknown = 1;
-       static char printk_buf[1024];
-
        unsigned long flags;
        int printed_len = 0;
        int this_cpu;
@@ -686,7 +684,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
                 * it can be printed at the next appropriate moment:
                 */
                if (!oops_in_progress) {
-                       printk_recursion_bug = 1;
+                       recursion_bug = 1;
                        goto out_restore_irqs;
                }
                zap_locks();
@@ -696,10 +694,10 @@ asmlinkage int vprintk(const char *fmt, va_list args)
        spin_lock(&logbuf_lock);
        printk_cpu = this_cpu;
 
-       if (printk_recursion_bug) {
-               printk_recursion_bug = 0;
-               strcpy(printk_buf, printk_recursion_bug_msg);
-               printed_len = sizeof(printk_recursion_bug_msg);
+       if (recursion_bug) {
+               recursion_bug = 0;
+               strcpy(printk_buf, recursion_bug_msg);
+               printed_len = sizeof(recursion_bug_msg);
        }
        /* Emit the output into the temporary buffer */
        printed_len += vscnprintf(printk_buf + printed_len,