From patchwork Thu Oct 19 20:06:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10018255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6A8F060224 for ; Thu, 19 Oct 2017 20:09:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E4992874E for ; Thu, 19 Oct 2017 20:09:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51B612875A; Thu, 19 Oct 2017 20:09:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D45742874E for ; Thu, 19 Oct 2017 20:09:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753654AbdJSUJA (ORCPT ); Thu, 19 Oct 2017 16:09:00 -0400 Received: from onstation.org ([52.200.56.107]:54084 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752571AbdJSUGj (ORCPT ); Thu, 19 Oct 2017 16:06:39 -0400 Received: from localhost.localdomain (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 7B1DA1FBF; Thu, 19 Oct 2017 20:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1508443598; bh=1TMXZVzY13YOha6/AbS61tUMQDsucmkUB3PVl/OAs44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BiSn416KRXQWEMV7FDthLOCp9kQ4JNHYlUCuknrH3+bAKtoC5UK/97khIRlN2lkdt 6RbevY/gr5I38mwmJzwvFeuOcpiQhW0XqJphsJ8FbHo/c8D6w+SNXJ+kt0490Sj1wU vVym74wSYjXxND8xSaJwGTk9iuBqUbFF92fmGLVs= From: Brian Masney To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Subject: [PATCH 07/13] staging: iio: tsl2x7x: remove unnecessary parentheses Date: Thu, 19 Oct 2017 16:06:26 -0400 Message-Id: <20171019200632.25820-8-masneyb@onstation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171019200632.25820-1-masneyb@onstation.org> References: <20171019200632.25820-1-masneyb@onstation.org> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the error 'Unnecessary parentheses around 'XXX' from checkpatch.pl. It also fixes several other places with unnecessary parentheses that checkpatch.pl did not detect. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 80968dd456a0..6cc89cd6505e 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -348,9 +348,9 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev) /* clear any existing interrupt status */ ret = i2c_smbus_write_byte(chip->client, - (TSL2X7X_CMD_REG | + TSL2X7X_CMD_REG | TSL2X7X_CMD_SPL_FN | - TSL2X7X_CMD_ALS_INT_CLR)); + TSL2X7X_CMD_ALS_INT_CLR); if (ret < 0) { dev_err(&chip->client->dev, "i2c_write_command failed - err = %d\n", ret); @@ -364,7 +364,7 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev) chip->als_cur_info.als_ch0 = ch0; chip->als_cur_info.als_ch1 = ch1; - if ((ch0 >= chip->als_saturation) || (ch1 >= chip->als_saturation)) { + if (ch0 >= chip->als_saturation || ch1 >= chip->als_saturation) { lux = TSL2X7X_LUX_CALC_OVER_FLOW; goto return_max; } @@ -697,14 +697,14 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev) dev_info(&chip->client->dev, "Setting Up Interrupt(s)\n"); reg_val = TSL2X7X_CNTL_PWR_ON | TSL2X7X_CNTL_ADC_ENBL; - if ((chip->settings.interrupts_en == 0x20) || - (chip->settings.interrupts_en == 0x30)) + if (chip->settings.interrupts_en == 0x20 || + chip->settings.interrupts_en == 0x30) reg_val |= TSL2X7X_CNTL_PROX_DET_ENBL; reg_val |= chip->settings.interrupts_en; ret = i2c_smbus_write_byte_data(chip->client, - (TSL2X7X_CMD_REG | - TSL2X7X_CNTRL), reg_val); + TSL2X7X_CMD_REG | TSL2X7X_CNTRL, + reg_val); if (ret < 0) dev_err(&chip->client->dev, "%s: failed in tsl2x7x_IOCTL_INT_SET.\n", @@ -1721,7 +1721,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp, return -EINVAL; } - ret = i2c_smbus_write_byte(clientp, (TSL2X7X_CMD_REG | TSL2X7X_CNTRL)); + ret = i2c_smbus_write_byte(clientp, TSL2X7X_CMD_REG | TSL2X7X_CNTRL); if (ret < 0) { dev_err(&clientp->dev, "write to cmd reg failed. err = %d\n", ret);