| Submitter | roel kluin |
|---|---|
| Date | Feb. 11, 2009, 10:49 a.m. |
| Message ID | <4992AD3A.7000301@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/22912/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
On Wed, 2009-02-11 at 02:49 -0800, Roel Kluin wrote: > With while (limit--) { ... } limit reaches -1, so 0 means success. > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Michael Chan <mchan@broadcom.com> Thanks. > --- > diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c > index 8b3f846..4595962 100644 > --- a/drivers/net/tg3.c > +++ b/drivers/net/tg3.c > @@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp) > } > udelay(10); > } > - if (limit <= 0) > + if (limit < 0) > return -EBUSY; > > return 0; > @@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp) > break; > } > } > - if (limit <= 0) > + if (limit < 0) > return -EBUSY; > > return 0; > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Michael Chan" <mchan@broadcom.com> Date: Wed, 11 Feb 2009 12:40:16 -0800 > > On Wed, 2009-02-11 at 02:49 -0800, Roel Kluin wrote: > > With while (limit--) { ... } limit reaches -1, so 0 means success. > > > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> > > Acked-by: Michael Chan <mchan@broadcom.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 8b3f846..4595962 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp) } udelay(10); } - if (limit <= 0) + if (limit < 0) return -EBUSY; return 0; @@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp) break; } } - if (limit <= 0) + if (limit < 0) return -EBUSY; return 0;
With while (limit--) { ... } limit reaches -1, so 0 means success. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html