Re: [PATCH] Staging: ks7010: ks_*: Braces should be used on all arms of these statements

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

 



On Fri, 2017-02-17 at 22:41 +0100, Shiva Kerdel wrote:
> Braces should be used on all arms of these statements (CHECK)..
[]
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
[]
> @@ -2148,8 +2148,9 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
>  				else
>  					rate_octet[i] =
>  					    priv->reg.rate_set.body[i];
> -			} else
> +			} else {
>  				break;
> +			}

Generally, any time you see a form like this,
the test should be reversed

	for/while/do {
		if (foo) {
			[bar...]
		} else {
			break;
		}
	
should be:

	for/while/do {
		if (!foo)
			break;
		[bar...]
	}

_______________________________________________
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