Re: [PATCH 0/4] tree-wide: fix comparison to bitshift when dealing with a mask

From: Wolfram Sang
Date: Tue Feb 06 2018 - 03:29:12 EST



> I found two more using "git grep 'define.*0x[0-9a-f]* < '":

I added '[0-9]\+' at the end of the regex to reduce the number of false
positives...

> drivers/net/can/m_can/m_can.c:#define RXFC_FWM_MASK (0x7f < RXFC_FWM_SHIFT)
> drivers/usb/gadget/udc/goku_udc.h:#define INT_EPnNAK(n)
> (0x00100 < (n)) /* 0 < n < 4 */

... but you found those two true positives in there. Nice, thanks!

Attachment: signature.asc
Description: PGP signature