From: Chen Yucong <slaoub@gmail.com>
To: mingo@kernel.org
Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] printk: introduce pr_default() macro
Date: Fri, 5 Feb 2016 21:48:11 +0800 [thread overview]
Message-ID: <1454680092-30523-1-git-send-email-slaoub@gmail.com> (raw)
Until now, we cover all log-levels by pr_<level> macros except
KERN_DEFAULT one. Add it for convenience.
Signed-off-by: Chen Yucong <slaoub@gmail.com>
---
include/linux/printk.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 51dd6b8..9808130 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -274,6 +274,8 @@ extern asmlinkage void dump_stack(void) __cold;
*/
#define pr_cont(fmt, ...) \
printk(KERN_CONT fmt, ##__VA_ARGS__)
+#define pr_default(fmt, ...) \
+ printk(KERN_DEFAULT pr_fmt(fmt), ##__VA_ARGS__)
/* pr_devel() should produce zero code unless DEBUG is defined */
#ifdef DEBUG
@@ -345,6 +347,8 @@ extern asmlinkage void dump_stack(void) __cold;
printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
#define pr_cont_once(fmt, ...) \
printk_once(KERN_CONT pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_default_once(fmt, ...) \
+ printk_once(KERN_DEFAULT pr_fmt(fmt), ##__VA_ARGS__)
#if defined(DEBUG)
#define pr_devel_once(fmt, ...) \
@@ -396,6 +400,8 @@ extern asmlinkage void dump_stack(void) __cold;
printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
#define pr_info_ratelimited(fmt, ...) \
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
+#define pr_default_ratelimited(fmt, ...) \
+ printk_ratelimited(KERN_DEFAULT pr_fmt(fmt), ##__VA_ARGS__)
/* no pr_cont_ratelimited, don't do that... */
#if defined(DEBUG)
--
1.8.3.1
next reply other threads:[~2016-02-05 13:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 13:48 Chen Yucong [this message]
2016-02-05 13:48 ` [PATCH 2/2] x86: use " Chen Yucong
2016-02-05 16:14 ` [PATCH 1/2] printk: introduce " Joe Perches
2016-02-05 16:14 ` Joe Perches
2016-02-09 9:52 ` Ingo Molnar
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=1454680092-30523-1-git-send-email-slaoub@gmail.com \
--to=slaoub@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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®