lkml.org 
[lkml]   [2015]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] staging: ft1000: fix braces warning
Ok,thank you, I will do that and resend the patch again.

On Tue, Feb 03, 2015 at 11:05:08AM -0800, Joe Perches wrote:
> On Tue, 2015-02-03 at 19:58 +0100, Bilel DRIRA wrote:
> > This patch fix the checkpatch.pl WARNING:
> []
> > diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
> []
> > @@ -1963,11 +1948,10 @@ static irqreturn_t ft1000_interrupt(int irq, void *dev_id)
> > ft1000_read_reg(dev,
> > FT1000_REG_MAG_DFSR);
> > }
> > - if (tempword & 0x1f) {
> > + if (tempword & 0x1f)
> > ft1000_copy_up_pkt(dev);
> > - } else {
> > + else
> > break;
> > - }
> > cnt++;
> > } while (cnt < MAX_RCV_LOOP);
> >
>
> trivia: the logic here is generally better inverted:
>
> if (!(tempword & 0x1f))
> break;
> ft1000_copy_up_pkt(dev);
> cnt++;
> } while (cnt < etc...)
>
>


\
 
 \ /
  Last update: 2015-02-03 21:21    [W:0.123 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site