* [PATCH] prevent that myri_do_handshake lies about ticks in drivers/net/myri_sbus.c
@ 2007-11-05 15:06 Roel Kluin
2007-11-13 11:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2007-11-05 15:06 UTC (permalink / raw)
To: netdev
With '<=' tick can be incremented up to 26, The last loop is redundant since
even when 'softstate' becomes 'STATE_READY', 'if (tick > 25)' will still cause
the function to return -1,
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index 8d29319..656a260 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -134,7 +134,7 @@ static int myri_do_handshake(struct myri_eth *mp)
myri_disable_irq(mp->lregs, cregs);
- while (tick++ <= 25) {
+ while (tick++ < 25) {
u32 softstate;
/* Wake it up. */
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-13 11:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05 15:06 [PATCH] prevent that myri_do_handshake lies about ticks in drivers/net/myri_sbus.c Roel Kluin
2007-11-13 11:16 ` 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).