Re: [PATCH] gx-suspmod: fix "&& 0xff" typo

From: Dave Jones
Date: Wed Nov 08 2006 - 17:50:48 EST


On Thu, Nov 09, 2006 at 01:20:46AM +0300, Alexey Dobriyan wrote:
> > > > - params->pci_rev = class_rev && 0xff;
> > > > + params->pci_rev = class_rev & 0xff;
> > >
> > > Hi,
> > > any kind of automated detection on that one?
> >
> > grep -r "&& 0x" . seems to be pretty effective modulo
> > some false-positives.
>
> Obligatory nit-picking:
>
> grep '&&[ ]*0[xX][fF]' -r .

That misses some cases. Like..

drivers/char/ipmi/ipmi_msghandler.c: bmc->id.device_revision && 0x80 >> 7);
drivers/char/ipmi/ipmi_msghandler.c: bmc->id.device_revision && 0x0F);

Dave

--
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/