Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1696295
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.12 002/196] [media] ir-core: fix gcc-7 warning on bool arithmetic |
| Date | 2017-07-25 22:20 +0200 |
| Message-ID | <u7ete-7sJ-65@gated-at.bofh.it> (permalink) |
| References | <u7dGN-6Sz-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <arnd@arndb.de>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/rc/imon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -1722,7 +1722,7 @@ static void imon_incoming_scancode(struc
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);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.12 000/196] 4.12.4-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 013/196] NFC: nfcmrvl: use nfc-device for firmware download Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 021/196] perf intel-pt: Ensure IP is zero when state is INTEL_PT_STATE_NO_IP Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 016/196] nfc: Fix the sockaddr length sanitization in llcp_sock_connect Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 012/196] NFC: nfcmrvl: do not use device-managed resources Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 002/196] [media] ir-core: fix gcc-7 warning on bool arithmetic Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 020/196] perf intel-pt: Fix missing stack clear Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 018/196] perf intel-pt: Move decoder error setting into one condition Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 025/196] perf intel-pt: Clear FUP flag on error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 014/196] NFC: nfcmrvl: fix firmware-management initialisation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 024/196] perf intel-pt: Use FUP always when scanning for an IP Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 022/196] perf intel-pt: Fix last_ip usage Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
[PATCH 4.12 023/196] perf intel-pt: Ensure never to set last_ip when packet count is zero Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-25 22:20 +0200
Re: [PATCH 4.12 000/196] 4.12.4-stable review Guenter Roeck <linux@roeck-us.net> - 2017-07-26 05:00 +0200
Re: [PATCH 4.12 000/196] 4.12.4-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-26 22:00 +0200
Re: [PATCH 4.12 000/196] 4.12.4-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-07-26 16:30 +0200
Re: [PATCH 4.12 000/196] 4.12.4-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-26 18:30 +0200
csiph-web