Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3331359imu; Sun, 11 Nov 2018 12:32:31 -0800 (PST) X-Google-Smtp-Source: AJdET5e69BjxCtVb7LquY4ipgBY43wkA2pRMmbMWS4UE5tArLqw4nbz6RL5WHMQgBGnUTpsQCnqQ X-Received: by 2002:a17:902:b598:: with SMTP id a24-v6mr17341824pls.231.1541968351223; Sun, 11 Nov 2018 12:32:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968351; cv=none; d=google.com; s=arc-20160816; b=zHYu7z6oo2E2IzTHKR/OBa3m0b7m+gw7k0z0WEBJjUiQQiR1x1tCgrvZMPrRHIEeOg Jx6P25g0eBSJ/Q4WdiKXiy1lI2XQHunnIbAL+af4HZikRSJgz9xt0gUEoqxFrWkFIJ5s HPBUcwGNm0vHVUfvQIIETY8fHos2R7Kkw/sXpS0BsW3ff8BYJiUVlTrBbZ5InzOzuQyf jiklaT/lsncRaWPpZqKHYFUpL3QKvuob7qb5GpsXiAwzINUogyLfrAaHAUozJUxM1ZFk hidRv53PasceM1j+rv1/8D9tanv6R7lltJL5zlOCkcVkJIojPn5LZCuMb97+xIMVugH0 JxoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=sBuVq/LF1zQJe1JUhSnqztZ22/spc/amydj2jkMaQgo=; b=I4Getq9mdXVE2EN+OKwE9Mpaz2L1FVP9ZPgfwwampwBLRofbBToypaWXajZbPQ20cE WB1GdCQiFr1pBDBuumgVGjX5dCC1qzqKQrkZ5lhtsoXButnk50C28REwQFl4u13ylzns Am3h/li2zuavQuM9pm/+zd8SrV3op6YmKL+TudRrvovK2E8qf3/f60t0CiBNKUNnCk3m ZhfmDcKN03+luHZ97bt24wtWL9IBxhjgLhKv9ae8x2q+oMhB9UVP37jY2u7OE5ShfHI8 KyWFqsA+ri5USuZiqJZKqr+E4KZbdnGUGXeFPbn32doXMgxV2DBc7AgfnyDKliHErim1 DmeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5-v6si13670891pgv.38.2018.11.11.12.32.16; Sun, 11 Nov 2018 12:32:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730590AbeKLGUE (ORCPT + 99 others); Mon, 12 Nov 2018 01:20:04 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50448 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730414AbeKLFsU (ORCPT ); Mon, 12 Nov 2018 00:48:20 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsg-0000tu-Pf; Sun, 11 Nov 2018 19:58:51 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsa-0001s9-BT; Sun, 11 Nov 2018 19:58:44 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Arnd Bergmann" , "Mauro Carvalho Chehab" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 344/366] [media] ir-core: fix gcc-7 warning on bool arithmetic In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann 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 Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Ben Hutchings --- 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 @@ -1530,7 +1530,7 @@ static void imon_incoming_packet(struct 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);