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: 9840311 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 331D3602BD for ; Fri, 14 Jul 2017 09:30:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24B1D28780 for ; Fri, 14 Jul 2017 09:30:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 196072878A; Fri, 14 Jul 2017 09:30:05 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 2176228780 for ; Fri, 14 Jul 2017 09:30:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753820AbdGNJ3n (ORCPT ); Fri, 14 Jul 2017 05:29:43 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:64994 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753561AbdGNJ3l (ORCPT ); Fri, 14 Jul 2017 05:29:41 -0400 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 Cc: Greg Kroah-Hartman , Linus Torvalds , Tejun Heo , Guenter Roeck , linux-ide@vger.kernel.org, linux-media@vger.kernel.org, akpm@linux-foundation.org, dri-devel@lists.freedesktop.org, Arnd Bergmann , linux-input@vger.kernel.org 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== Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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;