[PATCH 1/4] SunRPC: Use the standard varargs macro method fordfprintk() and co.

From: David Howells
Date: Thu Sep 26 2013 - 10:45:34 EST


Use the standard varargs macro method rather than the old gcc method for
dfprintk() and co.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---

include/linux/sunrpc/debug.h | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 9385bd7..889474b 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -32,33 +32,33 @@ 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_rcu(fmt, ...) dfprintk_rcu(FACILITY, fmt, ## __VA_ARGS__)

#undef ifdebug
#ifdef RPC_DEBUG
# define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac))

-# define dfprintk(fac, args...) \
+# define dfprintk(fac, fmt, ...) \
do { \
ifdebug(fac) \
- printk(KERN_DEFAULT args); \
+ printk(KERN_DEFAULT fmt, ##__VA_ARGS__); \
} while (0)

-# define dfprintk_rcu(fac, args...) \
+# define dfprintk_rcu(fac, fmt, ...) \
do { \
ifdebug(fac) { \
rcu_read_lock(); \
- printk(KERN_DEFAULT args); \
+ printk(KERN_DEFAULT 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 ifdebug(fac) if (0)
+# define dfprintk(fac, fmt, ...) do {} while (0)
+# define dfprintk_rcu(fac, fmt, ...) do {} while (0)
# define RPC_IFDEBUG(x)
#endif


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/