summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Gruzdev <michail.gruzdev@gmail.com>2013-02-21 16:43:10 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:22:21 -0800
commit36d308d8b547ee19d3fa7399858e5a1632413d0e (patch)
tree243dddf1159e211963e7d3d2cb0a16dc61506c60
parent7d7992108d02aa92ad4c77e5d9ce14088c942e75 (diff)
downloadop-kernel-dev-36d308d8b547ee19d3fa7399858e5a1632413d0e.zip
op-kernel-dev-36d308d8b547ee19d3fa7399858e5a1632413d0e.tar.gz
printk: add pr_devel_once and pr_devel_ratelimited
Standardize pr_devel logging macros family by adding pr_devel_once and pr_devel_ratelimited. Signed-off-by: Mikhail Gruzdev <michail.gruzdev@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/printk.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 86c4b62..54419f4 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -252,6 +252,15 @@ extern 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__)
+
+#if defined(DEBUG)
+#define pr_devel_once(fmt, ...) \
+ printk_once(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
+#else
+#define pr_devel_once(fmt, ...) \
+ no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
+#endif
+
/* If you are writing a driver, please use dev_dbg instead */
#if defined(DEBUG)
#define pr_debug_once(fmt, ...) \
@@ -295,6 +304,15 @@ extern void dump_stack(void) __cold;
#define pr_info_ratelimited(fmt, ...) \
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
/* no pr_cont_ratelimited, don't do that... */
+
+#if defined(DEBUG)
+#define pr_devel_ratelimited(fmt, ...) \
+ printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
+#else
+#define pr_devel_ratelimited(fmt, ...) \
+ no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
+#endif
+
/* If you are writing a driver, please use dev_dbg instead */
#if defined(DEBUG)
#define pr_debug_ratelimited(fmt, ...) \
OpenPOWER on IntegriCloud