Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Roel Kluin and committed by
David S. Miller
f307dbd8 16095595

+1 -1
+1 -1
drivers/net/smsc911x.c
··· 953 953 do { 954 954 udelay(1); 955 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 958 if (unlikely(timeout == 0)) 959 959 SMSC_WARNING(HW, "Timed out waiting for "