diff mbox

[OPW,kernel,06/16] staging: wlags49_h2: Enclose macro in a do-while loop

Message ID 9fb80a4fe6f276aa12181c89d7327686bc668ed1.1395092557.git.jelena.bjelja.ing@gmail.com
State New, archived
Headers show

Commit Message

Jelena Bjelja March 17, 2014, 10:39 p.m. UTC
This patch fixes the following checkpatch.pl issues in wl_netdev.c:
ERROR: Macros with multiple statements should be enclosed in a do -
while loop

Signed-off-by: Jelena Bjelja <jelena.bjelja.ing@gmail.com>
---
 drivers/staging/wlags49_h2/wl_netdev.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c
index 6d924c5..0ac4432 100644
--- a/drivers/staging/wlags49_h2/wl_netdev.c
+++ b/drivers/staging/wlags49_h2/wl_netdev.c
@@ -129,9 +129,11 @@ 
  * macros
  ******************************************************************************/
 #define BLOCK_INPUT(buf, len) \
-	desc->buf_addr = buf; \
-	desc->BUF_SIZE = len; \
-	status = hcf_rcv_msg(&(lp->hcfCtx), desc, 0)
+	do { \
+		desc->buf_addr = buf; \
+		desc->BUF_SIZE = len; \
+		status = hcf_rcv_msg(&(lp->hcfCtx), desc, 0); \
+	} while (0)
 
 #define BLOCK_INPUT_DMA(buf, len) memcpy(buf, desc_next->buf_addr, pktlen)