diff options
author | Greg Banks <gnb@sgi.com> | 2009-03-11 06:07:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:38:27 -0400 |
commit | e6e66b02e11563abdb7f69dcb7a2efbd8d577e77 (patch) | |
tree | db93d906bbe7a9b93dce80b8d67341ecad473fa4 /include/linux/kernel.h | |
parent | 9898abb3d23311fa227a7f46bf4e40fd2954057f (diff) |
Dynamic debug: fix pr_fmt() build error
When CONFIG_DYNAMIC_DEBUG is enabled, allow callers of pr_debug()
to provide their own definition of pr_fmt() even if that definition
uses tricks like
#define pr_fmt(fmt) "%s:" fmt, __func__
Signed-off-by: Greg Banks <gnb@sgi.com>
Cc: Jason Baron <jbaron@redhat.com>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b5496ecbec71..914918abfdd1 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -359,8 +359,9 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
359 | #define pr_debug(fmt, ...) \ | 359 | #define pr_debug(fmt, ...) \ |
360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 360 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
361 | #elif defined(CONFIG_DYNAMIC_DEBUG) | 361 | #elif defined(CONFIG_DYNAMIC_DEBUG) |
362 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | ||
362 | #define pr_debug(fmt, ...) do { \ | 363 | #define pr_debug(fmt, ...) do { \ |
363 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ | 364 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ |
364 | } while (0) | 365 | } while (0) |
365 | #else | 366 | #else |
366 | #define pr_debug(fmt, ...) \ | 367 | #define pr_debug(fmt, ...) \ |