diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 18:05:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 18:05:40 -0400 |
commit | a5e6b135bdff649e4330f98e2e80dbb1984f7e77 (patch) | |
tree | 475bfb1163c59d1370fd77415255afba768f9520 /include/linux/dynamic_debug.h | |
parent | 971f115a50afbe409825c9f3399d5a3b9aca4381 (diff) | |
parent | 9d90c8d9cde929cbc575098e825d7c29d9f45054 (diff) |
Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (50 commits)
printk: do not mangle valid userspace syslog prefixes
efivars: Add Documentation
efivars: Expose efivars functionality to external drivers.
efivars: Parameterize operations.
efivars: Split out variable registration
efivars: parameterize efivars
efivars: Make efivars bin_attributes dynamic
efivars: move efivars globals into struct efivars
drivers:misc: ti-st: fix debugging code
kref: Fix typo in kref documentation
UIO: add PRUSS UIO driver support
Fix spelling mistakes in Documentation/zh_CN/SubmittingPatches
firmware: Fix unaligned memory accesses in dmi-sysfs
firmware: Add documentation for /sys/firmware/dmi
firmware: Expose DMI type 15 System Event Log
firmware: Break out system_event_log in dmi-sysfs
firmware: Basic dmi-sysfs support
firmware: Add DMI entry types to the headers
Driver core: convert platform_{get,set}_drvdata to static inline functions
Translate linux-2.6/Documentation/magic-number.txt into Chinese
...
Diffstat (limited to 'include/linux/dynamic_debug.h')
-rw-r--r-- | include/linux/dynamic_debug.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 1c70028f81f9..0c9653f11c18 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -31,6 +31,10 @@ struct _ddebug { | |||
31 | * writes commands to <debugfs>/dynamic_debug/control | 31 | * writes commands to <debugfs>/dynamic_debug/control |
32 | */ | 32 | */ |
33 | #define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ | 33 | #define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ |
34 | #define _DPRINTK_FLAGS_INCL_MODNAME (1<<1) | ||
35 | #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) | ||
36 | #define _DPRINTK_FLAGS_INCL_LINENO (1<<3) | ||
37 | #define _DPRINTK_FLAGS_INCL_TID (1<<4) | ||
34 | #define _DPRINTK_FLAGS_DEFAULT 0 | 38 | #define _DPRINTK_FLAGS_DEFAULT 0 |
35 | unsigned int flags:8; | 39 | unsigned int flags:8; |
36 | char enabled; | 40 | char enabled; |
@@ -42,6 +46,8 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, | |||
42 | 46 | ||
43 | #if defined(CONFIG_DYNAMIC_DEBUG) | 47 | #if defined(CONFIG_DYNAMIC_DEBUG) |
44 | extern int ddebug_remove_module(const char *mod_name); | 48 | extern int ddebug_remove_module(const char *mod_name); |
49 | extern int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...) | ||
50 | __attribute__ ((format (printf, 2, 3))); | ||
45 | 51 | ||
46 | #define dynamic_pr_debug(fmt, ...) do { \ | 52 | #define dynamic_pr_debug(fmt, ...) do { \ |
47 | static struct _ddebug descriptor \ | 53 | static struct _ddebug descriptor \ |
@@ -50,7 +56,7 @@ extern int ddebug_remove_module(const char *mod_name); | |||
50 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ | 56 | { KBUILD_MODNAME, __func__, __FILE__, fmt, __LINE__, \ |
51 | _DPRINTK_FLAGS_DEFAULT }; \ | 57 | _DPRINTK_FLAGS_DEFAULT }; \ |
52 | if (unlikely(descriptor.enabled)) \ | 58 | if (unlikely(descriptor.enabled)) \ |
53 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \ | 59 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), ##__VA_ARGS__); \ |
54 | } while (0) | 60 | } while (0) |
55 | 61 | ||
56 | 62 | ||