public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] wlan-ng/prism2mgmt.c: added parenthesis to macro
@ 2012-12-17 13:38 Sebastian Wankerl
  2012-12-17 13:38 ` [PATCH 2/3] wlan-ng/prism2mgmt.c: formated too long lines Sebastian Wankerl
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Sebastian Wankerl @ 2012-12-17 13:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Dan Carpenter, devel, linux-kernel,
	Sebastian Wankerl

From: Sebastian Wankerl <sisewank@faui49man10.informatik.uni-erlangen.de>

Signed-off-by: Sebastian Wankerl <sisewank@cip.cs.fau.de> 
Signed-off-by: Sebastian Ehrenfels <qi50dube@cip.cs.fau.de> 

---
 drivers/staging/wlan-ng/prism2mgmt.c |   25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 4efa9bc..62b94b0 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -415,11 +415,14 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
 			break;
 
 #define REQBASICRATE(N) \
-	if ((count >= N) && DOT11_RATE5_ISBASIC_GET(item->supprates[(N)-1])) { \
-		req->basicrate ## N .data = item->supprates[(N)-1]; \
-		req->basicrate ## N .status = \
-			P80211ENUM_msgitem_status_data_ok; \
-	}
+	do { \
+		if ((count >= N) && DOT11_RATE5_ISBASIC_GET( \
+			item->supprates[(N)-1])) { \
+			req->basicrate ## N .data = item->supprates[(N)-1]; \
+			req->basicrate ## N .status = \
+				P80211ENUM_msgitem_status_data_ok; \
+		} \
+	} while (0)
 
 	REQBASICRATE(1);
 	REQBASICRATE(2);
@@ -431,11 +434,13 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
 	REQBASICRATE(8);
 
 #define REQSUPPRATE(N) \
-	if (count >= N) { \
-		req->supprate ## N .data = item->supprates[(N)-1]; \
-		req->supprate ## N .status = \
-			P80211ENUM_msgitem_status_data_ok; \
-	}
+	do { \
+		if (count >= N) { \
+			req->supprate ## N .data = item->supprates[(N)-1]; \
+			req->supprate ## N .status = \
+				P80211ENUM_msgitem_status_data_ok; \
+		} \
+	} while (0)
 
 	REQSUPPRATE(1);
 	REQSUPPRATE(2);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-01-18 21:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 13:38 [PATCH 1/3] wlan-ng/prism2mgmt.c: added parenthesis to macro Sebastian Wankerl
2012-12-17 13:38 ` [PATCH 2/3] wlan-ng/prism2mgmt.c: formated too long lines Sebastian Wankerl
2012-12-17 14:08   ` Dan Carpenter
2012-12-17 13:38 ` [PATCH 3/3] wlan-ng/prism2mgmt.c Replace printk(...) with netdev_warn, netdev_err Sebastian Wankerl
2012-12-17 14:13   ` Dan Carpenter
2012-12-17 14:00 ` [PATCH 1/3] wlan-ng/prism2mgmt.c: added parenthesis to macro Dan Carpenter
2012-12-18 21:47   ` Sebastian Ehrenfels
2013-01-17 20:58 ` Greg Kroah-Hartman
2013-01-17 23:07   ` [i4passt_all] " Sebastian Ehrenfels
2013-01-17 23:07     ` Sebastian Ehrenfels
2013-01-18 21:02       ` Greg Kroah-Hartman
2013-01-17 23:07     ` [PATCH 2/3] wlan-ng/prism2mgmt.c: formated too long lines Sebastian Ehrenfels
2013-01-18 21:00       ` Greg Kroah-Hartman
2013-01-17 23:07     ` [PATCH 3/3] wlan-ng/prism2mgmt.c Replace printk(...) with netdev_warn, netdev_err Sebastian Ehrenfels
2013-01-18 21:01       ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox