[PATCH 2/6] staging: ks7010: fix coding style issue of enclosing complex macro value in parentheses

Chetan Sethi cpsethi369 at gmail.com
Fri Feb 17 03:08:02 UTC 2017


This is 02nd patch to file ks_wlan.h file fixing error of enclosing
complex macro value in parentheses and do-while statement has been used
to prevent further warnings from checkpatch.pl

Signed-off-by: Chetan Sethi <cpsethi369 at gmail.com>
---
 drivers/staging/ks7010/ks_wlan.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 668202d..25dfbd1 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -36,8 +36,9 @@
 
 #ifdef KS_WLAN_DEBUG
 #define DPRINTK(n, fmt, args...) \
-                 if (KS_WLAN_DEBUG > (n)) \
-			printk(KERN_NOTICE "%s: "fmt, __FUNCTION__, ## args)
+                do {if (KS_WLAN_DEBUG > (n)) \
+			printk(KERN_NOTICE "%s: "fmt, __FUNCTION__, ## args); \
+		} while (0)
 #else
 #define DPRINTK(n, fmt, args...)
 #endif
-- 
2.7.4



More information about the devel mailing list