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: 107750 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp650677qge; Fri, 14 Jul 2017 02:29:26 -0700 (PDT) X-Received: by 10.98.7.87 with SMTP id b84mr4148728pfd.216.1500024565978; Fri, 14 Jul 2017 02:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500024565; cv=none; d=google.com; s=arc-20160816; b=EnNiw7z7gfDOJ+1Mq9qP+ldDIQ/8AuKwR7p3s28Ha3cITS04AExgbNTLjhT5n6ThYE GzHdSDlYiyrpW3JhnJVpMCbi7BgWDjblORknWpKIBjPeZ6ewiozX17hJTXRI7ThRGHZA iz91TqpRbFSqTyzqKCHc5iiCkEDtS6luCcORFsn6e10nPu31Hm/Xmj4Jdp9EQLdpLTck RYN3p9khhxzqLoNYIHF8uip24nuPFpVOI6yKaBkEX7WqMAYJ3w8axrkQeL+62EkfV2F5 8rr9HRv/XUAKLaata8I6HBUPyE+8UsJeJhKEujA3OQAsfufeNLEpoNl7K/YntG85ZkF2 kN8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:references:in-reply-to:message-id:date :subject:to:from:delivered-to:arc-authentication-results; bh=Nh9C96fbuIfhREaG1fkuYHq8Fl8xgMagaM1j5wR0WBs=; b=Ciatn/rNytq+HW2lAoDfVKFWGKGGfMcs0oLiIQaE0AbhmCDLV0ULt71vg5T4ImokCU sKZdeksydgg0pTE8vHFxWhy74Fb8LMzEeBPRYwQLvgoSzerXdtTcU0S9QUxzT2BzzhAU nvjchLppUp/lusKh2lkSjywV2xtKrUJna6BS1sLl6kZRfwQiOEiZJwJt2nQrFJev3O1n YQ+IH0egMuxal/qSQfW/0Z9f8o+yNovLx7/3GcgOaP0JGU4dDCqAGTd3NgmqBmerpDcJ 9k8/tzsqK8Nvz5p8oW9fvxBrv0tb5PgaSubO9/WD0W/Jfca5vA9tawS6TMOyDV3YwZzr 3+wQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id b59si6440872plb.225.2017.07.14.02.29.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jul 2017 02:29:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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" 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;