Received: by 10.223.176.5 with SMTP id f5csp652930wra; Tue, 6 Feb 2018 05:17:07 -0800 (PST) X-Google-Smtp-Source: AH8x226h6hXiNA/X98qYrZaqgoAkqncRTmmsZOym5i2rtNvQsByJfN7gtxP8ZWz5/ptgSrrO3Btj X-Received: by 10.99.113.16 with SMTP id m16mr1937340pgc.29.1517923027037; Tue, 06 Feb 2018 05:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517923027; cv=none; d=google.com; s=arc-20160816; b=Kh+ByQIi2yPCfgxpcPT/LCL1qehmCENxge+8J4bvtS/lTq3emLBqaZ1XLZhb2LQjOO NqPxVnrt4jZBpsS0RKFytcPmprFfAnhK6GOoauUaxt8iD54AF1Z8P+LOMHtookNU6e6h PJSmfkITaWIPakDRl/EJsj9wjavEP6irGzPqz0lBpxTQfD2psPQzCRIsgxZuFIgxWV7P eCJY7NML7Oti3PChR2RAmpFLFeQLzjxk7iXsBP0TE7iKYHyZDV6IBDAuJlbChSV9EbPp /qwiUeMTuKff6OJQmv1MBP9hJQtqNufMBN+pFYuXypufWjki20Z7erKrM6/0zJGikDig bDsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=2jhqdyWRNZOj8VE8tVddJ2egQ0zdSIjV9b6QNpCaxEI=; b=bUBi/A0dSTMJ8S8NSxM8v0zXi5tjX3xtZA3ls1xo9d5wYVrN147QpI1JDBFd8L5m37 kXa4RDZ9ITKGh7TjDbs7NiRInPWZF2T+YZmmktDSqJK3jMB9Mj6XdDbMuRrU9OMotLXP 7apPiLrRURXh3eaMFrngQ9tD1+NJd3N4i+je9NRcYTaE6ZlJIww2eMepCJyOtqWZVtti Rdw9WfUDGyIezu22rx6vIvGjmAQxQlrSdzR3rhES4dJ0wCNHDwqPVlc8gMao4+guTpn+ cxBAts6LNPS2rIyzc56p0WMdNbz6lJanBf70W29OPx6H74lj4xVtkBfB7yGLHzEVyYra f03g== 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 v12-v6si1578448plk.577.2018.02.06.05.16.52; Tue, 06 Feb 2018 05:17:06 -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 S1753045AbeBFNQQ (ORCPT + 99 others); Tue, 6 Feb 2018 08:16:16 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:47665 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752246AbeBFNQJ (ORCPT ); Tue, 6 Feb 2018 08:16:09 -0500 X-IronPort-AV: E=Sophos;i="5.46,468,1511823600"; d="scan'208";a="312270516" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 14:15:55 +0100 Date: Tue, 6 Feb 2018 14:15:51 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Dan Carpenter cc: Wolfram Sang , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-samsung-soc@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 0/4] tree-wide: fix comparison to bitshift when dealing with a mask In-Reply-To: <20180206131044.oso33fvv553trrd7@mwanda> Message-ID: References: <20180205201002.23621-1-wsa+renesas@sang-engineering.com> <20180206131044.oso33fvv553trrd7@mwanda> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 6 Feb 2018, Dan Carpenter wrote: > On Mon, Feb 05, 2018 at 09:09:57PM +0100, Wolfram Sang wrote: > > In one Renesas driver, I found a typo which turned an intended bit shift ('<<') > > into a comparison ('<'). Because this is a subtle issue, I looked tree wide for > > similar patterns. This small patch series is the outcome. > > > > Buildbot and checkpatch are happy. Only compile-tested. To be applied > > individually per sub-system, I think. I'd think only the net: amd: patch needs > > to be conisdered for stable, but I leave this to people who actually know this > > driver. > > > > CCing Dan. Maybe he has an idea how to add a test to smatch? In my setup, only > > cppcheck reported a 'coding style' issue with a low prio. > > > > Most of these are inside macros so it makes it complicated for Smatch > to warn about them. It might be easier in Coccinelle. Julia the bugs > look like this: > > - reissue_mask |= 0xffff < 4; > + reissue_mask |= 0xffff << 4; Thanks. I'll take a look. Do you have an example of the macro issue handy? julia > > regards, > dan carpenter > > > Wolfram Sang (4): > > v4l: vsp1: fix mask creation for MULT_ALPHA_RATIO > > drm/exynos: fix comparison to bitshift when dealing with a mask > > v4l: dvb-frontends: stb0899: fix comparison to bitshift when dealing > > with a mask > > net: amd-xgbe: fix comparison to bitshift when dealing with a mask > > > > drivers/gpu/drm/exynos/regs-fimc.h | 2 +- > > drivers/media/dvb-frontends/stb0899_reg.h | 8 ++++---- > > drivers/media/platform/vsp1/vsp1_regs.h | 2 +- > > drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- > > 4 files changed, 7 insertions(+), 7 deletions(-) > > > > -- > > 2.11.0 >