[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c9fed49-50a7-2877-e9bc-e650a20c0379@infradead.org>
Date: Tue, 25 Feb 2020 21:08:52 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>
Subject: [PATCH net-next] af_llc: fix if-statement empty body warning
From: Randy Dunlap <rdunlap@...radead.org>
When debugging via dprintk() is not enabled, make the dprintk()
macro be an empty do-while loop, as is done in
<linux/sunrpc/debug.h>.
This fixes a gcc warning when -Wextra is set:
../net/llc/af_llc.c:974:51: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
I have verified that there is not object code change (with gcc 7.5.0).
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>
---
net/llc/af_llc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20200225.orig/net/llc/af_llc.c
+++ linux-next-20200225/net/llc/af_llc.c
@@ -47,7 +47,7 @@ static int llc_ui_wait_for_busy_core(str
#if 0
#define dprintk(args...) printk(KERN_DEBUG args)
#else
-#define dprintk(args...)
+#define dprintk(args...) do {} while (0)
#endif
/* Maybe we'll add some more in the future. */
Powered by blists - more mailing lists