aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/9p/9p.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/9p/9p.h')
-rw-r--r--include/net/9p/9p.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 2d70b95b3b55..7184853ca360 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -63,30 +63,16 @@ enum p9_debug_flags {
63 63
64#ifdef CONFIG_NET_9P_DEBUG 64#ifdef CONFIG_NET_9P_DEBUG
65extern unsigned int p9_debug_level; 65extern unsigned int p9_debug_level;
66 66__printf(3, 4)
67#define P9_DPRINTK(level, format, arg...) \ 67void _p9_debug(enum p9_debug_flags level, const char *func,
68do { \ 68 const char *fmt, ...);
69 if ((p9_debug_level & level) == level) {\ 69#define p9_debug(level, fmt, ...) \
70 if (level == P9_DEBUG_9P) \ 70 _p9_debug(level, __func__, fmt, ##__VA_ARGS__)
71 printk(KERN_NOTICE "(%8.8d) " \
72 format , task_pid_nr(current) , ## arg); \
73 else \
74 printk(KERN_NOTICE "-- %s (%d): " \
75 format , __func__, task_pid_nr(current) , ## arg); \
76 } \
77} while (0)
78
79#else 71#else
80#define P9_DPRINTK(level, format, arg...) do { } while (0) 72#define p9_debug(level, fmt, ...) \
73 no_printk(fmt, ##__VA_ARGS__)
81#endif 74#endif
82 75
83
84#define P9_EPRINTK(level, format, arg...) \
85do { \
86 printk(level "9p: %s (%d): " \
87 format , __func__, task_pid_nr(current), ## arg); \
88} while (0)
89
90/** 76/**
91 * enum p9_msg_t - 9P message types 77 * enum p9_msg_t - 9P message types
92 * @P9_TLERROR: not used 78 * @P9_TLERROR: not used