From patchwork Mon Jul 17 11:43:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 107909 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4404464qge; Mon, 17 Jul 2017 04:44:08 -0700 (PDT) X-Received: by 10.84.129.71 with SMTP id 65mr30547862plb.183.1500291847933; Mon, 17 Jul 2017 04:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500291847; cv=none; d=google.com; s=arc-20160816; b=xAGiRWMjO1P4Aqs+gV1prcq6IJ74PuJDWevKNUGbGTlfcduNT/2a2yGzKQVO9fAd/d krw/jLIg56f7qz/FNGqNvBa5PdWkdQH8brSFsyYXMb3egNF9ePDDjpnivQE/QZUeRah5 Rx3A2MKWSnO/IGxMhzuqEY2AxvOU/wFs5IO6Y3elKoNO91Y+Cq6EXAguWoC/vUEynS8A c6CFivImbFpiBqvxpRWU+3Je5PZAEVWoRBsQOX89uRiEYDjryIZ001UrYM+ycrKv+O0b yorcdAOWOO484c7q7inZKjPErss90ruUyHcklN5h9DGjV1Lsv1N/zoWftrqsdZHjXxuT 5uzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=8nGHeoF6dMb8S6C1PgjISv3b6Q6w4WAuAw9Lhrrmm1A=; b=z5agVhxhT9ycmJfp0jOt3PULlI4GdxFWj2gmWnjvJ7lzcZebutZZRvWMfeW5DPKmkm q1S4S9kVDP4NUEvFU3nw89DSnDAu1J3PAahwdOhi1iM/g+9P+Vhnvv5wjq+g2X++waZM y+0tOmRKgjcuWCh2Ct44jiQ5o5fWMc8194VHLSGY1giRAWhwas3WvWzKLzm5xyN37cLX nggOMQbF5NcFtX1lHiJ/T3yCBpQ+rKZuwy59e5iJKyzWjgXXR5pX6IbOVwdqmfhixj+c t3yZaprQ+Ais0DKVxelUgO8u8Ow5TKxn9qLO1Q5VlAPHm9v0ETkCPO+kyoR4Kb1HlL2T Nn5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si9829768pli.634.2017.07.17.04.44.07 for ; Mon, 17 Jul 2017 04:44:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751289AbdGQLoH (ORCPT ); Mon, 17 Jul 2017 07:44:07 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:61820 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279AbdGQLoG (ORCPT ); Mon, 17 Jul 2017 07:44:06 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MOj82-1dawKc3QFa-006AIv; Mon, 17 Jul 2017 13:44:00 +0200 From: Arnd Bergmann To: Michael Hennerich , Dmitry Torokhov Cc: Arnd Bergmann , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] Input: adxl34x - fix gcc-7 -Wint-in-bool-context warning Date: Mon, 17 Jul 2017 13:43:51 +0200 Message-Id: <20170717114359.849493-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:phkeXldpZK+VpYsxXbCXk4BI+F3kWJ3sY5y65MeevUVvL1RczMF scQvu5GrPkh28GpMYh2e08qNwoJYKIAJmqqgfbVlIYj8/cWcVw9xSOjN5hsclFnW6QEstUR NIaFFusbsaVO5jaN0XK+WYqjSm9R82gIFB6cu/p9AJVn+YpZIbaHXsIzzyHYIpbp0XTVsBf c4EkzT84AxzkxnHrryxdQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:dCSizqtsmf0=:2VtAfqqUTzBh0e1jQzSwdS nMZ4Upaj3Fbgkzf17kFVkW9y5qmhLhWnYTRnoZzZoUJPrXcXihk45bVC9LagBzkmkHeUcF2l5 oEVUw+NKWGA7Wo/WMYX5z8dJOBxho3lGmvfK4TyHWDypLhuWHW0wnr+j3ntcZQliMQ2SQ0LiL V/q2NBhIzAfQYdGg0JHApnnbgmlU2rl3+TdVtQ4bb5zr1j27QFltkSpLqwSa328MlgsEzwAo0 TZWW8l8RQBw+rPHaiaUbAc58MA7Nilj/78sJW8auxLpUXLbK1eKPIG45+bDQC1/69x33EX6SV ni6xgXOKuU9wQQzqJuTWor4WmgWSdaQRjNkyVxb7ZfXv9cS7zspJ7G8e551ENVozHaepPuCz1 1WpgGw2PQQW7G4EBVD+hq2zlXSq30UbgcEfGmhp53FjZn35cTrqVtsrGYe+omBtjkF+X0l7im 4+URlhdfByy/2LNsrxVj3eCbhGxjXJd2WfofINk07yyDGnsCGLEBRXD989GA5Ku5+WYRpk7o0 n1HjQ6qRK1L7xjNBP8ULjtuDg8EAj7QL0yIGXoYjM8F3jdOKNWrnw5D8WXu1MSjDHTu2MHS7u if0M0bT1xM2A0tSqdz74f8FeyoQV1KMJzbZFFJUMXDeeBB9tLFbb3GETf3c53oZOEz077PBG2 C5KiPc1vWC5nLjWhD5xlGsqrFTVwYfaopyysuKaSFNmnZDAbNJkkIUglPumhzWKwmblnbEqNy OFbNvTpDde+C6Dm2PWOu7zw6p12lm3r5WtOAhg== Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 FIFO_BYPASS, 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 --- v2: use FIFO_BYPASS instead of 0 drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c index 2b2d02f408bb..a3e79bf5a04b 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) == FIFO_BYPASS) ac->pdata.fifo_mode |= FIFO_STREAM; } else { ac->int_mask |= DATA_READY;