summaryrefslogtreecommitdiffstats
path: root/include/linux/dev_printk.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dev_printk.h')
-rw-r--r--include/linux/dev_printk.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/include/linux/dev_printk.h b/include/linux/dev_printk.h
index ae80a303c2..6bfe70decc 100644
--- a/include/linux/dev_printk.h
+++ b/include/linux/dev_printk.h
@@ -130,16 +130,6 @@ void _dev_info(const struct device *dev, const char *fmt, ...)
})
/*
- * Dummy dev_printk for disabled debugging statements to use whilst maintaining
- * gcc's format checking.
- */
-#define dev_no_printk(level, dev, fmt, ...) \
- ({ \
- if (0) \
- _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
- })
-
-/*
* #defines for all the dev_<level> macros to prefix with whatever
* possible use of #define dev_fmt(fmt) ...
*/
@@ -168,7 +158,10 @@ void _dev_info(const struct device *dev, const char *fmt, ...)
dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
#else
#define dev_dbg(dev, fmt, ...) \
- dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
+({ \
+ if (0) \
+ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
+})
#endif
#ifdef CONFIG_PRINTK
@@ -254,14 +247,20 @@ do { \
} while (0)
#else
#define dev_dbg_ratelimited(dev, fmt, ...) \
- dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
+do { \
+ if (0) \
+ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
+} while (0)
#endif
#ifdef VERBOSE_DEBUG
#define dev_vdbg dev_dbg
#else
#define dev_vdbg(dev, fmt, ...) \
- dev_no_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__)
+({ \
+ if (0) \
+ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
+})
#endif
/*