From patchwork Fri Jul 14 09:25:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9840297 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 0A2B2602BD for ; Fri, 14 Jul 2017 09:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF2E42876A for ; Fri, 14 Jul 2017 09:29:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3FD128777; Fri, 14 Jul 2017 09:29:25 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9FCAE2876A for ; Fri, 14 Jul 2017 09:29:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2C4A6E7B6; Fri, 14 Jul 2017 09:29:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7AE8C6E7B6 for ; Fri, 14 Jul 2017 09:29:22 +0000 (UTC) Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0MUTsx-1d6TfV35tL-00RI63; Fri, 14 Jul 2017 11:28:34 +0200 From: Arnd Bergmann To: linux-kernel@vger.kernel.org, Michael Hennerich , Dmitry Torokhov Subject: [PATCH 08/14] Input: adxl34x - fix gcc-7 -Wint-in-bool-context warning Date: Fri, 14 Jul 2017 11:25:20 +0200 Message-Id: <20170714092540.1217397-9-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170714092540.1217397-1-arnd@arndb.de> References: <20170714092540.1217397-1-arnd@arndb.de> X-Provags-ID: V03:K0:Fwkg5V9Dkf3Uk6FDlnXEZHBUjN8FIRuacqjtkcbxi44iibS95M9 0I8HNX2ZcsN4tpmFb/ScHQ6blkJtcV9VzsN5YCaIJ/W92GrOZizrlINUXabEUs9B852yXdL ZnQeWBx6WdsBCNZRBOKdihdM+uafKdOEu1332gInBh++bO6nT5MdvP4Klyt7obTBXpmos7U c1Iu8xlS79GSp0melk2UA== X-UI-Out-Filterresults: notjunk:1; V01:K0:EddTXrPS/Pg=:dfytTiaXL9gbpr3NdvMTtc nLPuf+nCKuw2Y3IvBu2ll1WRCJ2+rgCScfqxTYO+B/xEJWTFe91Nw3T4ksQcnXoCKVSaC+uEi UuQdtIhuo6cG00SiSdxyzx6UoJSGqrcHxOurqC8n1AIbonqiu/OHlGShvFLpNgZ1chhKUzT5r 682YORNXtT9zOY0DGweyjm3a/+Yr1gcXVuQfJIOczhBrFR6DvZ3l0DWy/WidXZYgeHZvoIn49 TDT5YJC2ZIerT963KtGgSQS6QjnSEpNjL3tDFXX+47te56PpjbBX08kN8HCCKgA15KcoVzy3T tkhQNUn22EjDKmBeI7PMNq11amaicMTF6H5DCAcJ2/ExHnwMq/EZcugoQia9bQzM3nDKgLdsd uilPk/1nVaRKXq4nb4A/B+xtvNei3C/dP7rT55KzRtk/7u0SCVD04QXEduVW92eb5BrEkgC8C GnUHFZQ9YGFqxhwpfI2S5Zv1QXtLYMhqgePkCvROSJutMXpyrSuHJQFrkC5G7i8NUTkrz9+5X /hkicqCEjL4p4I0L3ADGovWuV+AxWkNXgmILMu8K4ox0YVAhEH1q0qpVqR4oH5dA2zx/iCqZ3 MjkQW6XDEvyNqamcPCFx7rSBHdT6H8gbhbvJtS2c2u2KcnFqsCxk6EWCjr/Sks9GReUNgwQOO D5MDIavtovGOyH1iExj0442yvCiQC1gShXIwxxcjMGSHD9vsacH3IP+Q5ygsHd5QbEhGPtNsT NysoDUyEbFap2gI8ToG/6wRt90x+ezj5PbTiCA== Cc: Arnd Bergmann , Greg Kroah-Hartman , dri-devel@lists.freedesktop.org, linux-ide@vger.kernel.org, linux-input@vger.kernel.org, Tejun Heo , akpm@linux-foundation.org, Linus Torvalds , Guenter Roeck , linux-media@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP FIFO_MODE is an macro expression with a '<<' operator, which gcc points out could be misread as a '<': drivers/input/misc/adxl34x.c: In function 'adxl34x_probe': drivers/input/misc/adxl34x.c:799:36: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] This converts the test to an explicit comparison with zero, making it clearer to gcc and the reader what is intended. Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Arnd Bergmann --- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index 2b2d02f408bb..e0caaa0de454 100644 --- a/drivers/input/misc/adxl34x.c +++ b/drivers/input/misc/adxl34x.c @@ -796,7 +796,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq, if (pdata->watermark) { ac->int_mask |= WATERMARK; - if (!FIFO_MODE(pdata->fifo_mode)) + if (FIFO_MODE(pdata->fifo_mode) == 0) ac->pdata.fifo_mode |= FIFO_STREAM; } else { ac->int_mask |= DATA_READY;