diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-03-06 13:41:55 +0300 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-06 14:14:54 +0300 |
commit | f3be97427172856d6865ddfedea84fa3a9f33227 (patch) | |
tree | d8b57c29ce2c5ad58511314eb42c85691288845f /drivers/net/sis900.c | |
parent | 84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5 (diff) | |
download | linux-f3be97427172856d6865ddfedea84fa3a9f33227.tar.xz |
sis900 warning fixes
drivers/net/sis900.c: In function 'sis900_reset_phy':
drivers/net/sis900.c:972: warning: 'status' may be used uninitialized in this function
drivers/net/sis900.c: In function 'sis900_check_mode':
drivers/net/sis900.c:1431: warning: 'status' may be used uninitialized in this function
drivers/net/sis900.c: In function 'sis900_timer':
drivers/net/sis900.c:1467: warning: 'status' may be used uninitialized in this function
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sis900.c')
-rw-r--r-- | drivers/net/sis900.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index fb2b53051635..b3750f284279 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c @@ -968,10 +968,10 @@ static void mdio_write(struct net_device *net_dev, int phy_id, int location, static u16 sis900_reset_phy(struct net_device *net_dev, int phy_addr) { - int i = 0; + int i; u16 status; - while (i++ < 2) + for (i = 0; i < 2; i++) status = mdio_read(net_dev, phy_addr, MII_STATUS); mdio_write( net_dev, phy_addr, MII_CONTROL, MII_CNTL_RESET ); @@ -1430,7 +1430,7 @@ static void sis900_auto_negotiate(struct net_device *net_dev, int phy_addr) int i = 0; u32 status; - while (i++ < 2) + for (i = 0; i < 2; i++) status = mdio_read(net_dev, phy_addr, MII_STATUS); if (!(status & MII_STAT_LINK)){ @@ -1466,9 +1466,9 @@ static void sis900_read_mode(struct net_device *net_dev, int *speed, int *duplex int phy_addr = sis_priv->cur_phy; u32 status; u16 autoadv, autorec; - int i = 0; + int i; - while (i++ < 2) + for (i = 0; i < 2; i++) status = mdio_read(net_dev, phy_addr, MII_STATUS); if (!(status & MII_STAT_LINK)) |