mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Make DEBUG take precedence over DYNAMIC_PRINTK_DEBUG
Statically defined DEBUG should take precedence over dynamically enabled debugging; otherwise adding DEBUG (like, for example, via CONFIG_DEBUG_KOBJECT) does not have the expected result of printing pr_debug() and dev_dbg() messages unconditionally. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b9daa99ee5
commit
d0d85ff989
2 changed files with 8 additions and 8 deletions
|
@ -349,13 +349,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
|
|||
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
|
||||
|
||||
/* If you are writing a driver, please use dev_dbg instead */
|
||||
#if defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
|
||||
#if defined(DEBUG)
|
||||
#define pr_debug(fmt, ...) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
|
||||
#define pr_debug(fmt, ...) do { \
|
||||
dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#elif defined(DEBUG)
|
||||
#define pr_debug(fmt, ...) \
|
||||
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_debug(fmt, ...) \
|
||||
({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue