public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Joe Perches <joe@perches.com>, Valentin Vidic <Valentin.Vidic@CARNet.hr>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	"Marcin Ciupak" <marcin.s.ciupak@gmail.com>,
	"Marcus Wolf" <linux@wolf-entwicklungen.de>,
	"Simon Sandström" <simon@nikanor.nu>
Subject: Re: [PATCH] staging: pi433: remove unnecessary parentheses
Date: Tue, 9 Jan 2018 15:31:48 +0100	[thread overview]
Message-ID: <20180109143148.GB608@kroah.com> (raw)
In-Reply-To: <20180108173855.19366-1-Valentin.Vidic@CARNet.hr>

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

  reply	other threads:[~2018-01-09 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 17:38 [PATCH] staging: pi433: remove unnecessary parentheses Valentin Vidic
2018-01-09 14:31 ` Greg Kroah-Hartman [this message]
2018-01-09 19:21   ` Joe Perches
2018-01-09 19:28     ` Greg Kroah-Hartman
2018-01-09 19:42       ` Joe Perches
2018-01-10  8:44         ` Greg Kroah-Hartman
2018-01-10  9:05           ` Joe Perches
2018-01-10  9:49             ` marcus.wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180109143148.GB608@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Valentin.Vidic@CARNet.hr \
    --cc=devel@driverdev.osuosl.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@wolf-entwicklungen.de \
    --cc=marcin.s.ciupak@gmail.com \
    --cc=simon@nikanor.nu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox