Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753828AbdGNJ3o (ORCPT ); Fri, 14 Jul 2017 05:29:44 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1106 Lines: 30 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; -- 2.9.0