From patchwork Wed Nov 1 21:26:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Willy Tarreau X-Patchwork-Id: 117736 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp1249758edm; Wed, 1 Nov 2017 14:29:28 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TOmfwjLBur5N+7lfOln2eH7YeseHToruhSrjbWMuIQBiGMzwiKGfWE9CezKy3HAu6Q6IK6 X-Received: by 10.99.42.210 with SMTP id q201mr1166140pgq.7.1509571768638; Wed, 01 Nov 2017 14:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509571768; cv=none; d=google.com; s=arc-20160816; b=zgZSzD5PtSrV1kt+GsDpfXBke6CgCWHmUVVpNmyele8zy76nnJuW5/6F3rVDMPNCHa 5s+EbiucLBEgldb4HR/pIvy/fmgJzzWPcjRriC4W7Ls8hrjxnWH+m9S8Xgvx3ScCSwXk 38EE6g8HQY11RAljxIhmgAvt/qT8IdDHV8N2nxkWH2fHsaFBVyiGRk1BNiX0jiCmudCm 0HqPAEgSb5YxobyipBgvTTJsKYCegfXE7Lr1rHp5Y1yWIN69a3tEluy7NCUixxZdennT BG+pCnlAtd+qYInvUF3hBYkGIy5eCWp8YLIQ0qG0QG3HLYSMTOQpUYBfU89o6SH7FZ2x dDAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=7Z18ny5x/1BvpoLSEuNBEpLQEsvkH3r/utKL8BTPQ6A=; b=YSHvPpdwJQJ7C7AxAEMP/9U5Vcj9FHd1nJk1G9Fr8vsA+zTWcTDER6bFOTrq2lXgBp Y2WwGqIrm3mi0u3B62WUjX5GRbxnlqb1AD7JyVgkhJ0FgAuzZ7iloh52v9c72vnc9XZZ csJR7KSfpIzQhawe+sKJ3liVY0oBnrlxPEDYyZNm5OAUtVALqKwvpBRjhGUOkkbHMe8Y DpjBV/eZymw1WSynl9diIBviGK80yjJsT4mag/pGMD4IJVvGl/aEL2065jX9iwyfW74A /4a4nRBpwHAcjfc15iVFfRinAmansj1rTwDieO/ck2m+LnVm63tWa2oYsm6B1oWUsXo5 1BFQ== 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 g1si553638plp.633.2017.11.01.14.29.26; Wed, 01 Nov 2017 14:29:28 -0700 (PDT) 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 S934466AbdKAV3X (ORCPT + 26 others); Wed, 1 Nov 2017 17:29:23 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:35477 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934411AbdKAV3Q (ORCPT ); Wed, 1 Nov 2017 17:29:16 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id vA1LR9XY005096; Wed, 1 Nov 2017 22:27:09 +0100 From: Willy Tarreau To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux@roeck-us.net Cc: Arnd Bergmann , Mauro Carvalho Chehab , Willy Tarreau Subject: [PATCH 3.10 114/139] [media] ir-core: fix gcc-7 warning on bool arithmetic Date: Wed, 1 Nov 2017 22:26:39 +0100 Message-Id: <1509571624-5001-15-git-send-email-w@1wt.eu> X-Mailer: git-send-email 2.8.0.rc2.1.gbe9624a In-Reply-To: <1509571624-5001-1-git-send-email-w@1wt.eu> References: <1509571159-4405-1-git-send-email-w@1wt.eu> <1509571624-5001-1-git-send-email-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Willy Tarreau --- drivers/media/rc/imon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.8.0.rc2.1.gbe9624a diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 72e3fa6..257bb7a 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -1530,7 +1530,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);