From: Roel Kluin <roel.kluin@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: steve.glendinning@smsc.com, netdev@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] SMSC: timeout reaches -1
Date: Fri, 20 Feb 2009 09:51:36 +0100 [thread overview]
Message-ID: <499E6F18.4080503@gmail.com> (raw)
In-Reply-To: <20090220.004114.239993457.davem@davemloft.net>
David Miller wrote:
> From: Roel Kluin <roel.kluin@gmail.com>
> Date: Mon, 16 Feb 2009 11:21:33 +0100
>
>> With a postfix decrement timeouts will reach -1 rather than 0, so
>> the error path does not appear.
>>
>> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
>
> Steve Glendinning submitted the smsc9420 side of this patch,
> please resubmit this with only the smsc911x.c part present.
>
> Thanks.
>
ok, here:
--------------------------->8-------------8<------------------------------
With a postfix decrement timeouts will reach -1 rather than 0, so
the error path does not appear.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 783c1a7..9a78dae 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1624,7 +1624,7 @@ static int smsc911x_eeprom_send_cmd(struct smsc911x_data *pdata, u32 op)
do {
msleep(1);
e2cmd = smsc911x_reg_read(pdata, E2P_CMD);
- } while ((e2cmd & E2P_CMD_EPC_BUSY_) && (timeout--));
+ } while ((e2cmd & E2P_CMD_EPC_BUSY_) && (--timeout));
if (!timeout) {
SMSC_TRACE(DRV, "TIMED OUT");
next prev parent reply other threads:[~2009-02-20 8:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 10:21 [PATCH] SMSC: timeout reaches -1 Roel Kluin
2009-02-20 8:41 ` David Miller
2009-02-20 8:51 ` Roel Kluin [this message]
2009-02-20 8:52 ` 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=499E6F18.4080503@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=steve.glendinning@smsc.com \
/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).