]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/sunrpc/debug.h
sunrpc & nfs: Add and use dprintk_cont macros
[linux.git] / include / linux / sunrpc / debug.h
index 59a7889e15db51c3b24bc771dbe5d0b1c965212d..8da0f37f3bdc2622cb378c04acf2ec43c882a3af 100644 (file)
@@ -20,33 +20,55 @@ extern unsigned int         nfsd_debug;
 extern unsigned int            nlm_debug;
 #endif
 
-#define dprintk(args...)       dfprintk(FACILITY, ## args)
-#define dprintk_rcu(args...)   dfprintk_rcu(FACILITY, ## args)
+#define dprintk(fmt, ...)                                              \
+       dfprintk(FACILITY, fmt, ##__VA_ARGS__)
+#define dprintk_cont(fmt, ...)                                         \
+       dfprintk_cont(FACILITY, fmt, ##__VA_ARGS__)
+#define dprintk_rcu(fmt, ...)                                          \
+       dfprintk_rcu(FACILITY, fmt, ##__VA_ARGS__)
+#define dprintk_rcu_cont(fmt, ...)                                     \
+       dfprintk_rcu_cont(FACILITY, fmt, ##__VA_ARGS__)
 
 #undef ifdebug
 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
 # define ifdebug(fac)          if (unlikely(rpc_debug & RPCDBG_##fac))
 
-# define dfprintk(fac, args...)        \
-       do { \
-               ifdebug(fac) \
-                       printk(KERN_DEFAULT args); \
-       } while (0)
-
-# define dfprintk_rcu(fac, args...)    \
-       do { \
-               ifdebug(fac) { \
-                       rcu_read_lock(); \
-                       printk(KERN_DEFAULT args); \
-                       rcu_read_unlock(); \
-               } \
-       } while (0)
+# define dfprintk(fac, fmt, ...)                                       \
+do {                                                                   \
+       ifdebug(fac)                                                    \
+               printk(KERN_DEFAULT fmt, ##__VA_ARGS__);                \
+} while (0)
+
+# define dfprintk_cont(fac, fmt, ...)                                  \
+do {                                                                   \
+       ifdebug(fac)                                                    \
+               printk(KERN_CONT fmt, ##__VA_ARGS__);                   \
+} while (0)
+
+# define dfprintk_rcu(fac, fmt, ...)                                   \
+do {                                                                   \
+       ifdebug(fac) {                                                  \
+               rcu_read_lock();                                        \
+               printk(KERN_DEFAULT fmt, ##__VA_ARGS__);                \
+               rcu_read_unlock();                                      \
+       }                                                               \
+} while (0)
+
+# define dfprintk_rcu_cont(fac, fmt, ...)                              \
+do {                                                                   \
+       ifdebug(fac) {                                                  \
+               rcu_read_lock();                                        \
+               printk(KERN_CONT fmt, ##__VA_ARGS__);                   \
+               rcu_read_unlock();                                      \
+       }                                                               \
+} while (0)
 
 # define RPC_IFDEBUG(x)                x
 #else
 # define ifdebug(fac)          if (0)
-# define dfprintk(fac, args...)        do {} while (0)
-# define dfprintk_rcu(fac, args...)    do {} while (0)
+# define dfprintk(fac, fmt, ...)       do {} while (0)
+# define dfprintk_cont(fac, fmt, ...)  do {} while (0)
+# define dfprintk_rcu(fac, fmt, ...)   do {} while (0)
 # define RPC_IFDEBUG(x)
 #endif