From: Roel Kluin Date: Fri, 30 Jan 2009 01:30:00 +0000 (-0800) Subject: smsc911x: timeout reaches -1 X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=f307dbd88d82c4ccab7aec49613c366023b89cde;p=deliverable%2Flinux.git smsc911x: timeout reaches -1 With a postfix decrement the timeout will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin Acked-by: Steve Glendinning Signed-off-by: David S. Miller --- diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index f513bdf1c887..783c1a7b869e 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 "