mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amerigo Wang <amwang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: WANG Cong <amwang@redhat.com>,
	Ingo Molnar <mingo@elte.hu> (commit_signer:8/43=19% 
	,commit_signer:4/26=15%),
	Andrew Morton <akpm@linux-foundation.org>
	(commit_signer:7/43=16%  ,commit_signer:9/26=35%),
	Peter Zijlstra <a.p.zijlstra@chello.nl> (commit_signer:5/43=12%),
	Tejun Heo <tj@kernel.org> (commit_signer:4/43=9%),
	Arnd Bergmann <arnd@arndb.de> (commit_signer:3/43=7%),
	James Morris <jmorris@namei.org> (commit_signer:6/26=23%),
	Kees Cook <kees.cook@canonical.com> (commit_signer:4/26=15%),
	Namhyung Kim <namhyung@gmail.com> (commit_signer:3/26=12%)
Subject: [Patch] printk: move some loglevel setup functions to kernel/printk.c
Date: Wed, 19 Jan 2011 15:29:24 +0800	[thread overview]
Message-ID: <1295422165-22269-1-git-send-email-amwang@redhat.com> (raw)

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)

             reply	other threads:[~2011-01-19  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19  7:29 Amerigo Wang [this message]
2011-01-19 20:18 ` Andrew Morton
2011-01-20  7:36   ` Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295422165-22269-1-git-send-email-amwang@redhat.com \
    --to=amwang@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=jmorris@namei.org \
    --cc=kees.cook@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@gmail.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®