linux/drivers/input
Arnd Bergmann 16ac4c8ee9 Input: adxl34x - do not treat FIFO_MODE() as boolean
commit 1dbc080c9e upstream.

FIFO_MODE() is a 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]

While utility of this warning is being disputed (Chief Penguin: "This
warning is clearly pure garbage.") FIFO_MODE() extracts range of values,
with 0 being FIFO_BYPASS, and not something that is logically boolean.

This converts the test to an explicit comparison with FIFO_BYPASS,
making it clearer to gcc and the reader what is intended.

Fixes: e27c729219 ("Input: add driver for ADXL345/346 Digital Accelerometers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-02-13 18:42:02 +00:00
..
gameport Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
joystick Input: xpad - validate USB endpoint type during probe 2017-11-26 13:50:36 +00:00
keyboard Input: tegra-kbc - fix inverted reset logic 2016-11-20 01:17:16 +00:00
misc Input: adxl34x - do not treat FIFO_MODE() as boolean 2018-02-13 18:42:02 +00:00
mouse Input: trackpoint - add new trackpoint firmware ID 2017-11-11 13:33:23 +00:00
serio Input: i8042 - add Gigabyte P57 to the keyboard reset table 2017-11-26 13:50:38 +00:00
tablet Input: gtco - fix potential out-of-bound access 2017-11-26 13:50:39 +00:00
touchscreen Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreen 2018-01-01 20:51:56 +00:00
apm-power.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
evbug.c Input: use pr_fmt and pr_<level> 2010-11-30 23:10:26 -08:00
evdev.c Input: evdev - do not report errors form flush() 2015-09-29 16:44:46 +01:00
ff-core.c Input: uinput - avoid FF flush when destroying device 2018-01-01 20:51:36 +00:00
ff-memless.c Input: random formatting fixes 2012-08-21 22:29:49 -07:00
input-compat.c compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-compat.h compat: Use COMPAT_USE_64BIT_TIME in the input subsystem 2012-02-20 12:48:47 -08:00
input-mt.c Input: MT - handle semi-mt devices in core 2013-04-07 21:02:32 -07:00
input-polldev.c Input: implement managed polled input devices 2014-05-14 16:40:04 -07:00
input.c Input: fix defuzzing logic 2014-07-20 13:17:42 -07:00
joydev.c Input: fix use-after-free introduced with dynamic minor changes 2012-10-22 08:50:37 +03:00
Kconfig Input: mousedev - allow disabling even without CONFIG_EXPERT 2013-10-31 08:46:07 -07:00
Makefile Input: matrix-keymap - uninline and prepare for device tree support 2012-05-10 22:38:47 -07:00
matrix-keymap.c input: Export matrix_keypad_parse_of_params() 2013-04-19 00:31:13 +02:00
mousedev.c Input: mousedev - fix race when creating mixed device 2014-03-29 14:44:23 -07:00
sparse-keymap.c treewide: Fix typo in Documentation/DocBook 2014-02-19 14:58:17 +01:00