summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/imon.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-05-11 13:46:44 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-19 12:04:45 +0200
commitbd7e31bbade02bc1e92aa00d5cf2cee2da66838a (patch)
tree4ce3986dcb43f89fe9b231beca3ed42b6611bac4 /drivers/media/rc/imon.c
parent[media] atomisp: fix missing blank line coding style issue in atomisp_tpg.c (diff)
downloadlinux-bd7e31bbade02bc1e92aa00d5cf2cee2da66838a.tar.xz
linux-bd7e31bbade02bc1e92aa00d5cf2cee2da66838a.zip
[media] ir-core: fix gcc-7 warning on bool arithmetic
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>
Diffstat (limited to 'drivers/media/rc/imon.c')
-rw-r--r--drivers/media/rc/imon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index 3489010601b5..bd76534a2749 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -1722,7 +1722,7 @@ static void imon_incoming_scancode(struct imon_context *ictx,
if (kc == KEY_KEYBOARD && !ictx->release_code) {
ictx->last_keycode = kc;
if (!nomouse) {
- ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1;
+ ictx->pad_mouse = !ictx->pad_mouse;
dev_dbg(dev, "toggling to %s mode\n",
ictx->pad_mouse ? "mouse" : "keyboard");
spin_unlock_irqrestore(&ictx->kc_lock, flags);