Re: [PATCH] staging: pi433: remove unnecessary parentheses

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

 



On Mon, Jan 08, 2018 at 06:38:55PM +0100, Valentin Vidic wrote:
> Fixes checkpatch warnings:
> 
>   CHECK: Unnecessary parentheses around 'mantisse != mantisse16'
>   CHECK: Unnecessary parentheses around 'mantisse != mantisse20'
>   CHECK: Unnecessary parentheses around 'mantisse != mantisse24'
> 
> Signed-off-by: Valentin Vidic <Valentin.Vidic@xxxxxxxxx>
> ---
>  drivers/staging/pi433/rf69.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index bdd00f750765..a07fc6bc27f7 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -391,9 +391,9 @@ static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg,
>  		return -EINVAL;
>  	}
>  
> -	if ((mantisse != mantisse16) &&
> -	    (mantisse != mantisse20) &&
> -	    (mantisse != mantisse24)) {
> +	if (mantisse != mantisse16 &&
> +	    mantisse != mantisse20 &&
> +	    mantisse != mantisse24) {

I'm getting really tired of seeing this checkpatch warning, when it's a
major pain.

Joe, can you please turn these off.  Patches like this will force people
to have to remember that != is higher precidence than &&.  The original
code here was just fine.

thanks,

greg k-h

>  		dev_dbg(&spi->dev, "set: illegal input param");
>  		return -EINVAL;
>  	}
> -- 
> 2.15.1
> 
> _______________________________________________
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxx
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
_______________________________________________
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