Re: [PATCH 02/11] staging: rtl8188eu: for loop instead of while loop used

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

 



On Wed, Nov 04, 2015 at 10:12:12AM +0700, Ivan Safonov wrote:
> diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
> index d502606..6d6dd15 100644
> --- a/drivers/staging/rtl8188eu/hal/fw.c
> +++ b/drivers/staging/rtl8188eu/hal/fw.c
> @@ -89,10 +89,8 @@ static void _rtl88e_fill_dummy(u8 *pfwbuf, u32 *pfwlen)
>  	remain = (remain == 0) ? 0 : (4 - remain);
>  	n = remain;
>  
> -	while (remain > 0) {
> +	for (; remain > 0; fwlen++, remain--) {
>  		pfwbuf[fwlen] = 0;
> -		fwlen++;
> -		remain--;
>  	}

So, this patch for example, because of your change now the for loop is a
one line loop.  It means you need to remove the curly braces.  Don't
introduce a checkpatch warning and then fix it in a later patch.

The one thing per patch rule is slightly tricky and fuzzy...

regards,
dan carpenter

_______________________________________________
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