[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1396461184-13231-2-git-send-email-guido@vanguardiasur.com.ar>
Date: Wed, 2 Apr 2014 14:53:01 -0300
From: Guido Martínez <guido@...guardiasur.com.ar>
To: linux-kernel@...r.kernel.org
Cc: Greg KH <gregkh@...uxfoundation.org>, forest@...ttletooquiet.net,
Walter Lozano <walter@...guardiasur.com.ar>,
Ezequiel García <ezequiel@...guardiasur.com.ar>,
driverdev-devel@...uxdriverproject.org,
Guido Martínez <guido@...guardiasur.com.ar>
Subject: [PATCH v2 1/4] staging: vt6655: fix DBG_PRT and PRINT_K macros
Wrap both macros inside a 'do { ... } while(0)' to prevent breakage if
used within another 'if'. Also fix a usage of DBG_PRT with a missing
semicolon.
Signed-off-by: Guido Martínez <guido@...guardiasur.com.ar>
---
drivers/staging/vt6655/device.h | 13 +++++++++++--
drivers/staging/vt6655/wpactl.c | 2 +-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 062c3a3..985c3c1 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -148,8 +148,17 @@
/*--------------------- Export Types ------------------------------*/
-#define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
-#define PRINT_K(p, args...) { if (PRIVATE_Message) printk(p, ##args); }
+#define DBG_PRT(l, p, args...) \
+do { \
+ if (l <= msglevel) \
+ printk(p, ##args); \
+} while (0)
+
+#define PRINT_K(p, args...) \
+do { \
+ if (PRIVATE_Message) \
+ printk(p, ##args); \
+} while (0)
//0:11A 1:11B 2:11G
typedef enum _VIA_BB_TYPE
diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index d17224f..bdfb528 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -679,7 +679,7 @@ static int wpa_get_scan(PSDevice pDevice,
ret = -EFAULT;
}
param->u.scan_results.scan_count = count;
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count)
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count);
kfree(pBuf);
return ret;
--
1.9.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists