ir-core: fix gcc-7 warning on bool arithmetic
authorArnd Bergmann <arnd@arndb.de>
Thu, 11 May 2017 11:46:44 +0000 (08:46 -0300)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Nov 2017 09:45:57 +0000 (10:45 +0100)
commitad0871670732e6094c796e0d3062c7b7843891fd
tree77d43c78cb71e9ec34a5acd91b725194839c41b4
parent7fb443fa86195a13277194e5f112445d982e639e
ir-core: fix gcc-7 warning on bool arithmetic

commit bd7e31bbade02bc1e92aa00d5cf2cee2da66838a upstream.

gcc-7 suggests that an expression using a bitwise not and a bitmask
on a 'bool' variable is better written using boolean logic:

drivers/media/rc/imon.c: In function 'imon_incoming_scancode':
drivers/media/rc/imon.c:1725:22: error: '~' on a boolean expression [-Werror=bool-operation]
    ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1;
                      ^
drivers/media/rc/imon.c:1725:22: note: did you mean to use logical not?

I agree.

Fixes: 21677cfc562a ("V4L/DVB: ir-core: add imon driver")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/media/rc/imon.c