[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170714092540.1217397-9-arnd@arndb.de>
Date: Fri, 14 Jul 2017 11:25:20 +0200
From: Arnd Bergmann <arnd@...db.de>
To: linux-kernel@...r.kernel.org,
Michael Hennerich <michael.hennerich@...log.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>, Guenter Roeck <linux@...ck-us.net>,
linux-ide@...r.kernel.org, linux-media@...r.kernel.org,
akpm@...ux-foundation.org, dri-devel@...ts.freedesktop.org,
Arnd Bergmann <arnd@...db.de>, linux-input@...r.kernel.org
Subject: [PATCH 08/14] Input: adxl34x - fix gcc-7 -Wint-in-bool-context warning
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 <arnd@...db.de>
---
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
Powered by blists - more mailing lists