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: 9844725 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 CF61C6037F for ; Mon, 17 Jul 2017 11:44:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFFAD26E4A for ; Mon, 17 Jul 2017 11:44:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B133527CEA; Mon, 17 Jul 2017 11:44:08 +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 4923726E4A for ; Mon, 17 Jul 2017 11:44:08 +0000 (UTC) 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 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 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(-) 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;