lkml.org 
[lkml]   [2014]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/5] staging: wlags49_h2: Correct macro style in wl_netdev.c
    On Wed, Mar 19, 2014 at 09:20:34AM +0100, Mathieu Maret wrote:
    > Multi statement macro should use do{}while(0)
    >
    > Signed-off-by: Mathieu Maret <mathieu.maret@gmail.com>
    > ---
    > drivers/staging/wlags49_h2/wl_netdev.c | 8 +++++---
    > 1 file changed, 5 insertions(+), 3 deletions(-)
    >
    > diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c
    > index 255d291..6455956 100644
    > --- a/drivers/staging/wlags49_h2/wl_netdev.c
    > +++ b/drivers/staging/wlags49_h2/wl_netdev.c
    > @@ -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 )
    >

    You didn't test-build the code after making this change, as this patch
    breaks the build into lots of tiny pieces :(

    Please ALWAYS test your patches.

    I've applied the first 3 patches, please fix this one up (if it's even
    possible, hint, I don't think it is...) and resend the remaining
    patches.

    thanks,

    greg k-h


    \
     
     \ /
      Last update: 2014-03-19 17:41    [W:2.990 / U:0.628 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site