diff options
-rw-r--r-- | include/linux/device.h | 8 | ||||
-rw-r--r-- | include/linux/dynamic_debug.h | 4 | ||||
-rw-r--r-- | include/linux/netdevice.h | 8 | ||||
-rw-r--r-- | include/linux/printk.h | 8 |
4 files changed, 16 insertions, 12 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 5b3adb8f9588..a782d7ff9e8b 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -945,14 +945,14 @@ int _dev_info(const struct device *dev, const char *fmt, ...) | |||
945 | 945 | ||
946 | #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg) | 946 | #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg) |
947 | 947 | ||
948 | #if defined(DEBUG) | 948 | #if defined(CONFIG_DYNAMIC_DEBUG) |
949 | #define dev_dbg(dev, format, arg...) \ | ||
950 | dev_printk(KERN_DEBUG, dev, format, ##arg) | ||
951 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
952 | #define dev_dbg(dev, format, ...) \ | 949 | #define dev_dbg(dev, format, ...) \ |
953 | do { \ | 950 | do { \ |
954 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ | 951 | dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \ |
955 | } while (0) | 952 | } while (0) |
953 | #elif defined(DEBUG) | ||
954 | #define dev_dbg(dev, format, arg...) \ | ||
955 | dev_printk(KERN_DEBUG, dev, format, ##arg) | ||
956 | #else | 956 | #else |
957 | #define dev_dbg(dev, format, arg...) \ | 957 | #define dev_dbg(dev, format, arg...) \ |
958 | ({ \ | 958 | ({ \ |
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index f71a6b046245..29ea09ae30cf 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -26,7 +26,11 @@ struct _ddebug { | |||
26 | #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) | 26 | #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) |
27 | #define _DPRINTK_FLAGS_INCL_LINENO (1<<3) | 27 | #define _DPRINTK_FLAGS_INCL_LINENO (1<<3) |
28 | #define _DPRINTK_FLAGS_INCL_TID (1<<4) | 28 | #define _DPRINTK_FLAGS_INCL_TID (1<<4) |
29 | #if defined DEBUG | ||
30 | #define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT | ||
31 | #else | ||
29 | #define _DPRINTK_FLAGS_DEFAULT 0 | 32 | #define _DPRINTK_FLAGS_DEFAULT 0 |
33 | #endif | ||
30 | unsigned int flags:8; | 34 | unsigned int flags:8; |
31 | } __attribute__((aligned(8))); | 35 | } __attribute__((aligned(8))); |
32 | 36 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0eac07c95255..f486f635e7b5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2687,14 +2687,14 @@ int netdev_info(const struct net_device *dev, const char *format, ...); | |||
2687 | #define MODULE_ALIAS_NETDEV(device) \ | 2687 | #define MODULE_ALIAS_NETDEV(device) \ |
2688 | MODULE_ALIAS("netdev-" device) | 2688 | MODULE_ALIAS("netdev-" device) |
2689 | 2689 | ||
2690 | #if defined(DEBUG) | 2690 | #if defined(CONFIG_DYNAMIC_DEBUG) |
2691 | #define netdev_dbg(__dev, format, args...) \ | ||
2692 | netdev_printk(KERN_DEBUG, __dev, format, ##args) | ||
2693 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
2694 | #define netdev_dbg(__dev, format, args...) \ | 2691 | #define netdev_dbg(__dev, format, args...) \ |
2695 | do { \ | 2692 | do { \ |
2696 | dynamic_netdev_dbg(__dev, format, ##args); \ | 2693 | dynamic_netdev_dbg(__dev, format, ##args); \ |
2697 | } while (0) | 2694 | } while (0) |
2695 | #elif defined(DEBUG) | ||
2696 | #define netdev_dbg(__dev, format, args...) \ | ||
2697 | netdev_printk(KERN_DEBUG, __dev, format, ##args) | ||
2698 | #else | 2698 | #else |
2699 | #define netdev_dbg(__dev, format, args...) \ | 2699 | #define netdev_dbg(__dev, format, args...) \ |
2700 | ({ \ | 2700 | ({ \ |
diff --git a/include/linux/printk.h b/include/linux/printk.h index f0e22f75143f..f9abd9357a0c 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -180,13 +180,13 @@ extern void dump_stack(void) __cold; | |||
180 | #endif | 180 | #endif |
181 | 181 | ||
182 | /* If you are writing a driver, please use dev_dbg instead */ | 182 | /* If you are writing a driver, please use dev_dbg instead */ |
183 | #if defined(DEBUG) | 183 | #if defined(CONFIG_DYNAMIC_DEBUG) |
184 | #define pr_debug(fmt, ...) \ | ||
185 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
186 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
187 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | 184 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ |
188 | #define pr_debug(fmt, ...) \ | 185 | #define pr_debug(fmt, ...) \ |
189 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | 186 | dynamic_pr_debug(fmt, ##__VA_ARGS__) |
187 | #elif defined(DEBUG) | ||
188 | #define pr_debug(fmt, ...) \ | ||
189 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
190 | #else | 190 | #else |
191 | #define pr_debug(fmt, ...) \ | 191 | #define pr_debug(fmt, ...) \ |
192 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 192 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |