Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753740AbeAIObr (ORCPT + 1 other); Tue, 9 Jan 2018 09:31:47 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:54584 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752330AbeAIObq (ORCPT ); Tue, 9 Jan 2018 09:31:46 -0500 Date: Tue, 9 Jan 2018 15:31:48 +0100 From: Greg Kroah-Hartman To: Joe Perches , Valentin Vidic Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Marcin Ciupak , Marcus Wolf , Simon =?iso-8859-1?Q?Sandstr=F6m?= Subject: Re: [PATCH] staging: pi433: remove unnecessary parentheses Message-ID: <20180109143148.GB608@kroah.com> References: <20180108173855.19366-1-Valentin.Vidic@CARNet.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180108173855.19366-1-Valentin.Vidic@CARNet.hr> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 > --- > 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