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

Wolfram Sang wsa at the-dreams.de
Tue Feb 6 00:28:56 PST 2018


> 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!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180206/17969e2b/attachment.sig>


More information about the linux-arm-kernel mailing list