mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-10-29 22:43:48 +00:00
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
|
From 83cd4eea92d5cbb1a52316a51dba51568e99b680 Mon Sep 17 00:00:00 2001
|
||
|
From: Arnd Bergmann <arnd@arndb.de>
|
||
|
Date: Thu, 11 May 2017 08:46:44 -0300
|
||
|
Subject: [PATCH 11/13] [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>
|
||
|
---
|
||
|
drivers/media/rc/imon.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
|
||
|
index 65f80b8b9f7a..eb9e7feb9b13 100644
|
||
|
--- a/drivers/media/rc/imon.c
|
||
|
+++ b/drivers/media/rc/imon.c
|
||
|
@@ -1629,7 +1629,7 @@ static void imon_incoming_packet(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);
|
||
|
--
|
||
|
2.13.3
|
||
|
|