public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] printk: move some loglevel setup functions to kernel/printk.c
@ 2011-01-19  7:29 Amerigo Wang
  2011-01-19 20:18 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Amerigo Wang @ 2011-01-19  7:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: WANG Cong, Ingo Molnar, Andrew Morton, Peter Zijlstra, Tejun Heo,
	Arnd Bergmann, James Morris, Kees Cook, Namhyung Kim

These parameter setup functions should go to kernel/printk.c,
and should also be under CONFIG_PRINTK.

Signed-off-by: WANG Cong <amwang@redhat.com>

---
diff --git a/init/main.c b/init/main.c
index 00799c1..b832b69 100644
--- a/init/main.c
+++ b/init/main.c
@@ -240,29 +240,6 @@ unsigned long loops_per_jiffy = (1<<12);
 
 EXPORT_SYMBOL(loops_per_jiffy);
 
-static int __init debug_kernel(char *str)
-{
-	console_loglevel = 10;
-	return 0;
-}
-
-static int __init quiet_kernel(char *str)
-{
-	console_loglevel = 4;
-	return 0;
-}
-
-early_param("debug", debug_kernel);
-early_param("quiet", quiet_kernel);
-
-static int __init loglevel(char *str)
-{
-	get_option(&str, &console_loglevel);
-	return 0;
-}
-
-early_param("loglevel", loglevel);
-
 /*
  * Unknown boot options get handed to init, unless they look like
  * unused parameters (modprobe will find them in /proc/cmdline).
diff --git a/kernel/printk.c b/kernel/printk.c
index 53d9a9e..e495a2c 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -467,6 +467,30 @@ static void __call_console_drivers(unsigned start, unsigned end)
 	}
 }
 
+static int __init debug_kernel(char *str)
+{
+	console_loglevel = 10;
+	return 0;
+}
+
+early_param("debug", debug_kernel);
+
+static int __init quiet_kernel(char *str)
+{
+	console_loglevel = 4;
+	return 0;
+}
+
+early_param("quiet", quiet_kernel);
+
+static int __init loglevel(char *str)
+{
+	get_option(&str, &console_loglevel);
+	return 0;
+}
+
+early_param("loglevel", loglevel);
+
 static int __read_mostly ignore_loglevel;
 
 static int __init ignore_loglevel_setup(char *str)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-20  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19  7:29 [Patch] printk: move some loglevel setup functions to kernel/printk.c Amerigo Wang
2011-01-19 20:18 ` Andrew Morton
2011-01-20  7:36   ` Cong Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox