netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Steve.Glendinning@smsc.com
Cc: roel.kluin@gmail.com, netdev@vger.kernel.org, Ian.Saturley@smsc.com
Subject: Re: [PATCH] smsc911x: timeout reaches -1
Date: Thu, 29 Jan 2009 17:30:09 -0800 (PST)	[thread overview]
Message-ID: <20090129.173009.230013997.davem@davemloft.net> (raw)
In-Reply-To: <OF3A0B52EF.AB017C24-ON8025754D.00547404-8025754D.00548C02@smsc.com>

From: Steve.Glendinning@smsc.com
Date: Thu, 29 Jan 2009 15:22:03 +0000

> Roel Kluin <roel.kluin@gmail.com> wrote on 29/01/2009 15:12:03:
> 
> > With a postfix decrement the timeout will reach -1 rather than 0,
> > so the warning will not be issued.
> > 
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> > diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
> > index f513bdf..783c1a7 100644
> > --- a/drivers/net/smsc911x.c
> > +++ b/drivers/net/smsc911x.c
> > @@ -953,7 +953,7 @@ smsc911x_rx_fastforward(struct smsc911x_data 
> > *pdata, unsigned int pktbytes)
> >        do {
> >           udelay(1);
> >           val = smsc911x_reg_read(pdata, RX_DP_CTRL);
> > -      } while (timeout-- && (val & RX_DP_CTRL_RX_FFWD_));
> > +      } while (--timeout && (val & RX_DP_CTRL_RX_FFWD_));
> > 
> >        if (unlikely(timeout == 0))
> >           SMSC_WARNING(HW, "Timed out waiting for "
> 
> Thanks for spotting this Roel.
> 
> Acked-by: Steve Glendinning <steve.glendinning@smsc.com>

Applied, thanks everyone.

      reply	other threads:[~2009-01-30  1:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 15:12 [PATCH] smsc911x: timeout reaches -1 Roel Kluin
2009-01-29 15:22 ` Steve.Glendinning
2009-01-30  1:30   ` David Miller [this message]

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=20090129.173009.230013997.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Ian.Saturley@smsc.com \
    --cc=Steve.Glendinning@smsc.com \
    --cc=netdev@vger.kernel.org \
    --cc=roel.kluin@gmail.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).