[PATCH] i386/x86-64: make setup_early_printk() usage consistent
authorJan Beulich <jbeulich@novell.com>
Wed, 11 Jan 2006 21:47:03 +0000 (22:47 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 03:05:04 +0000 (19:05 -0800)
The explicit and implicit calls to setup_early_printk() were passing
inconsistent arguments.

Signed-Off-By: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/setup.c
arch/x86_64/kernel/early_printk.c
arch/x86_64/kernel/head64.c

index a720f743ea6e089a024d36ffdec0db7dda800a55..51e513b4f72d02db2e5c2dcac9b09d905c9854ed 100644 (file)
@@ -1584,7 +1584,7 @@ void __init setup_arch(char **cmdline_p)
                if (s) {
                        extern void setup_early_printk(char *);
 
-                       setup_early_printk(s);
+                       setup_early_printk(strchr(s, '=') + 1);
                        printk("early console enabled\n");
                }
        }
index 9cd968dd0f5a4bd3b9d4b83525f94ee5386fec14..6dffb498ccd7e4fc36fde19db33c51190c269ab7 100644 (file)
@@ -216,7 +216,7 @@ void early_printk(const char *fmt, ...)
        va_end(ap); 
 } 
 
-static int keep_early; 
+static int __initdata keep_early;
 
 int __init setup_early_printk(char *opt) 
 {  
@@ -226,8 +226,6 @@ int __init setup_early_printk(char *opt)
        if (early_console_initialized)
                return -1;
 
-       opt = strchr(opt, '=') + 1;
-
        strlcpy(buf,opt,sizeof(buf)); 
        space = strchr(buf, ' '); 
        if (space)
index 2ea42ceb08f30e1bbad7f927dac4fe2d3b6426f2..cea20a66c150b38250477d870e170a059d1942a6 100644 (file)
@@ -102,7 +102,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
 #endif
        s = strstr(saved_command_line, "earlyprintk=");
        if (s != NULL)
-               setup_early_printk(s);
+               setup_early_printk(strchr(s, '=') + 1);
 #ifdef CONFIG_NUMA
        s = strstr(saved_command_line, "numa=");
        if (s != NULL)