Re: [PATCH] net: variables reach -1, but 0 tested

From: David Miller
Date: Sun Feb 01 2009 - 04:58:24 EST


From: Daniel Walker <dwalker@xxxxxxxxxx>
Date: Sat, 31 Jan 2009 12:35:12 -0800

> On Sat, 2009-01-31 at 11:36 +0100, Roel Kluin wrote:
>
> >
> > - while (limit--) {
> > + while (--limit) {
> > val = phy_read(phy, MII_BMCR);
> > if (val >= 0 && (val & BMCR_RESET) == 0)
> > break;
>
> It looks like these are checked for <= to 0 , are these changes strictly
> nessesary?

Agreed.

I'd like to apply these fixes to net-2.6 but I can't if there
are spurious cases in here.

I'm dropping this patch for now.
--
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/