netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] TG3: limit reaches -1
@ 2009-02-11 10:49 Roel Kluin
  2009-02-11 20:40 ` Michael Chan
  2009-02-15 22:17 ` [PATCH] TG3: &&/|| confusion Roel Kluin
  0 siblings, 2 replies; 7+ messages in thread
From: Roel Kluin @ 2009-02-11 10:49 UTC (permalink / raw)
  To: mchan; +Cc: netdev, Andrew Morton

With while (limit--) { ... } limit reaches -1, so 0 means success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-19  1:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 10:49 [PATCH] TG3: limit reaches -1 Roel Kluin
2009-02-11 20:40 ` Michael Chan
2009-02-13  0:33   ` David Miller
2009-02-15 22:17 ` [PATCH] TG3: &&/|| confusion Roel Kluin
2009-02-16 17:27   ` Michael Chan
2009-02-17 18:34     ` Matt Carlson
2009-02-19  1:42       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).