From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Subject: Re: [PATCH 0/4] tree-wide: fix comparison to bitshift when dealing with a mask Date: Tue, 6 Feb 2018 15:08:21 +0100 (CET) Message-ID: References: <20180205201002.23621-1-wsa+renesas@sang-engineering.com> <20180206131044.oso33fvv553trrd7@mwanda> <20180206132335.luut6em3kut7f7ej@mwanda> <20180206135923.3zthazmsapuzfxra@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 To: Dan Carpenter Return-path: In-Reply-To: <20180206135923.3zthazmsapuzfxra@mwanda> Sender: linux-renesas-soc-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Tue, 6 Feb 2018, Dan Carpenter wrote: > That found 4 that I think Wolfram's grep missed. > > arch/um/drivers/vector_user.h | 2 -- > drivers/gpu/drm/mxsfb/mxsfb_regs.h | 2 -- > drivers/video/fbdev/mxsfb.c | 2 -- > include/drm/drm_scdc_helper.h | 3 --- > > But it didn't find the two bugs that Geert found where the right side > wasn't a number literal. > > drivers/net/can/m_can/m_can.c:#define RXFC_FWM_MASK (0x7f < RXFC_FWM_SHIFT) OK, I can easily add this in - I've got rules to protect against reporting it at the moment. It may end up with false positives. > drivers/usb/gadget/udc/goku_udc.h:#define INT_EPnNAK(n) (0x00100 < (n)) /* 0 < n < 4 */ This is indeed harder, because one has to look at the usage site. julia