diff options
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r-- | net/dccp/dccp.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index ecb4e7bd1a84..33d86f53138b 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -26,15 +26,20 @@ | |||
26 | __stringify((cond))); \ | 26 | __stringify((cond))); \ |
27 | } while (0) | 27 | } while (0) |
28 | 28 | ||
29 | #ifdef MODULE | ||
30 | #define DCCP_PRINTK(enable, fmt, args...) do { if (enable) \ | ||
31 | printk(fmt, ##args); \ | ||
32 | } while(0) | ||
33 | #else | ||
34 | #define DCCP_PRINTK(enable, fmt, args...) printk(fmt, ##args) | ||
35 | #endif | ||
36 | #define DCCP_PR_DEBUG(enable, fmt, a...) DCCP_PRINTK(enable, KERN_DEBUG \ | ||
37 | "%s: " fmt, __FUNCTION__, ##a) | ||
38 | |||
29 | #ifdef CONFIG_IP_DCCP_DEBUG | 39 | #ifdef CONFIG_IP_DCCP_DEBUG |
30 | extern int dccp_debug; | 40 | extern int dccp_debug; |
31 | 41 | #define dccp_pr_debug(format, a...) DCCP_PR_DEBUG(dccp_debug, format, ##a) | |
32 | #define dccp_pr_debug(format, a...) \ | 42 | #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) |
33 | do { if (dccp_debug) \ | ||
34 | printk(KERN_DEBUG "%s: " format, __FUNCTION__ , ##a); \ | ||
35 | } while (0) | ||
36 | #define dccp_pr_debug_cat(format, a...) do { if (dccp_debug) \ | ||
37 | printk(format, ##a); } while (0) | ||
38 | #else | 43 | #else |
39 | #define dccp_pr_debug(format, a...) | 44 | #define dccp_pr_debug(format, a...) |
40 | #define dccp_pr_debug_cat(format, a...) | 45 | #define dccp_pr_debug_cat(format, a...) |