diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-01-29 20:30:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-29 20:30:00 -0500 |
commit | f307dbd88d82c4ccab7aec49613c366023b89cde (patch) | |
tree | 9ac218178afe51593091e8d9734a3e33a98eeb5f /drivers/net/smsc911x.c | |
parent | 1609559547ae0ddc2e4829c7f78ac2c4869875b9 (diff) |
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 <roel.kluin@gmail.com>
Acked-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smsc911x.c')
-rw-r--r-- | drivers/net/smsc911x.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
953 | do { | 953 | do { |
954 | udelay(1); | 954 | udelay(1); |
955 | val = smsc911x_reg_read(pdata, RX_DP_CTRL); | 955 | val = smsc911x_reg_read(pdata, RX_DP_CTRL); |
956 | } while (timeout-- && (val & RX_DP_CTRL_RX_FFWD_)); | 956 | } while (--timeout && (val & RX_DP_CTRL_RX_FFWD_)); |
957 | 957 | ||
958 | if (unlikely(timeout == 0)) | 958 | if (unlikely(timeout == 0)) |
959 | SMSC_WARNING(HW, "Timed out waiting for " | 959 | SMSC_WARNING(HW, "Timed out waiting for " |