staging: wlags49_h2: Correct macro style in wl_netdev.c
PATCH v2 4/5 staging: wlags49_h2: Correct macro style in wl_netdev.c
Multi statement macro should use do{}while(0)
patch v2 does not break compilation
--- drivers/staging/wlags49_h2/wl_netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/staging/wlags49_h2/wl_netdev.c +5 -3
@@ -107,9 +107,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 )
Signature · 1 line
1.9.0
Greg KH
maintainerQuoted 13 lines · Mathieu Maret
Multi statement macro should use do{}while(0)
patch v2 does not break compilation
--- drivers/staging/wlags49_h2/wl_netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/staging/wlags49_h2/wl_netdev.c +0
-0@@ -107,9 +107,11 @@* macros
drivers/staging/wlags49_h2/wl_netdev.c line 114
Quoted 10 lines
drivers/staging/wlags49_h2/wl_netdev.c +5
-3******************************************************************************/ #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)
This patch is already in my tree :(
thanks,
greg k-h