From: Roel Kluin <12o3l@tiscali.nl>
To: netdev@vger.kernel.org
Subject: [PATCH] prevent that myri_do_handshake lies about ticks in drivers/net/myri_sbus.c
Date: Mon, 05 Nov 2007 16:06:11 +0100 [thread overview]
Message-ID: <472F3163.2060302@tiscali.nl> (raw)
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. */
next reply other threads:[~2007-11-05 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-05 15:06 Roel Kluin [this message]
2007-11-13 11:16 ` [PATCH] prevent that myri_do_handshake lies about ticks in drivers/net/myri_sbus.c David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=472F3163.2060302@tiscali.nl \
--to=12o3l@tiscali.nl \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).