Re: [PATCH] staging: ft1000: fix else style error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 13, 2015 at 08:01:39AM -0800, Joe Perches wrote:
> On Tue, 2015-01-13 at 12:57 +0100, Bilel DRIRA wrote:
> > 	ERROR: else should follow close brace '}'
> []
> > diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
> []
> > @@ -572,8 +572,7 @@ static void ft1000_hbchk(u_long data)
> >  		if (tempword != ho) {
> >  			if (info->AsicID == ELECTRABUZZ_ID) {
> >  				tempword = ft1000_read_dpram(dev, FT1000_HI_HO);
> > -			}
> > -			else {
> > +			} else {
> >  				tempword = ntohs(ft1000_read_dpram_mag_16(dev, FT1000_MAG_HI_HO, FT1000_MAG_HI_HO_INDX));
> >  			}
> >  		}
> 
> True, but you could instead remove all the braces
> around both arms from all uses of
> 
> 	if (test) {
> 		<single statement>;
> 	} else {
> 		<single statement>;
> 	}
> 
> > @@ -688,15 +687,13 @@ static void ft1000_hbchk(u_long data)
> >  		if (tempword != hi) {
> >  			if (info->AsicID == ELECTRABUZZ_ID) {
> >  				ft1000_write_dpram(dev, FT1000_HI_HO, hi);
> > -			}
> > -			else {
> > +			} else {
> >  				ft1000_write_dpram_mag_16(dev, FT1000_MAG_HI_HO, hi_mag, FT1000_MAG_HI_HO_INDX);
> >  			}
> 
> etc...
> 
> 

Hi Joe,

Of course, you are right. I will do that and resend the patch.

Thanks.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux