lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180109143148.GB608@kroah.com>
Date:   Tue, 9 Jan 2018 15:31:48 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Joe Perches <joe@...ches.com>,
        Valentin Vidic <Valentin.Vidic@...Net.hr>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Marcin Ciupak <marcin.s.ciupak@...il.com>,
        Marcus Wolf <linux@...f-entwicklungen.de>,
        Simon Sandström <simon@...anor.nu>
Subject: Re: [PATCH] staging: pi433: remove unnecessary parentheses

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@...Net.hr>
> ---
>  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@...uxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ