summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-12-14 18:00:14 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 08:53:25 -0800
commit00b55864bb37200d7f05143c44f5e2edfc8c4578 (patch)
treee744e54d7422559c3504724dfc85d678bc2996cf /include/linux/kernel.h
parent42f247c83aeb52d2ee7a9fe23fb57e22317f18fd (diff)
downloadlinux-3.10-00b55864bb37200d7f05143c44f5e2edfc8c4578.tar.gz
linux-3.10-00b55864bb37200d7f05143c44f5e2edfc8c4578.tar.bz2
linux-3.10-00b55864bb37200d7f05143c44f5e2edfc8c4578.zip
dynamic_debug.h/kernel.h: Remove KBUILD_MODNAME from dynamic_pr_debug
If CONFIG_DYNAMIC_DEBUG is enabled and a source file has: #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/kernel.h> dynamic_debug.h will duplicate KBUILD_MODNAME in the output string. Remove the use of KBUILD_MODNAME from the output format string generated by dynamic_debug.h If CONFIG_DYNAMIC_DEBUG is not enabled, no compile-time check is done to printk/dev_printk arguments. Add it. Signed-off-by: Joe Perches <joe@perches.com> Cc: Jason Baron <jbaron@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 3fa4c590cf1..a93cdd031ae 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -397,9 +397,8 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#elif defined(CONFIG_DYNAMIC_DEBUG)
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
-#define pr_debug(fmt, ...) do { \
- dynamic_pr_debug(fmt, ##__VA_ARGS__); \
- } while (0)
+#define pr_debug(fmt, ...) \
+ dynamic_pr_debug(fmt, ##__VA_ARGS__)
#else
#define pr_debug(fmt, ...) \
({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })