diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-03-06 05:41:55 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-06 06:14:54 -0500 |
commit | f3be97427172856d6865ddfedea84fa3a9f33227 (patch) | |
tree | d8b57c29ce2c5ad58511314eb42c85691288845f | |
parent | 84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5 (diff) |
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>
-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, | |||
968 | 968 | ||
969 | static u16 sis900_reset_phy(struct net_device *net_dev, int phy_addr) | 969 | static u16 sis900_reset_phy(struct net_device *net_dev, int phy_addr) |
970 | { | 970 | { |
971 | int i = 0; | 971 | int i; |
972 | u16 status; | 972 | u16 status; |
973 | 973 | ||
974 | while (i++ < 2) | 974 | for (i = 0; i < 2; i++) |
975 | status = mdio_read(net_dev, phy_addr, MII_STATUS); | 975 | status = mdio_read(net_dev, phy_addr, MII_STATUS); |
976 | 976 | ||
977 | mdio_write( net_dev, phy_addr, MII_CONTROL, MII_CNTL_RESET ); | 977 | 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) | |||
1430 | int i = 0; | 1430 | int i = 0; |
1431 | u32 status; | 1431 | u32 status; |
1432 | 1432 | ||
1433 | while (i++ < 2) | 1433 | for (i = 0; i < 2; i++) |
1434 | status = mdio_read(net_dev, phy_addr, MII_STATUS); | 1434 | status = mdio_read(net_dev, phy_addr, MII_STATUS); |
1435 | 1435 | ||
1436 | if (!(status & MII_STAT_LINK)){ | 1436 | if (!(status & MII_STAT_LINK)){ |
@@ -1466,9 +1466,9 @@ static void sis900_read_mode(struct net_device *net_dev, int *speed, int *duplex | |||
1466 | int phy_addr = sis_priv->cur_phy; | 1466 | int phy_addr = sis_priv->cur_phy; |
1467 | u32 status; | 1467 | u32 status; |
1468 | u16 autoadv, autorec; | 1468 | u16 autoadv, autorec; |
1469 | int i = 0; | 1469 | int i; |
1470 | 1470 | ||
1471 | while (i++ < 2) | 1471 | for (i = 0; i < 2; i++) |
1472 | status = mdio_read(net_dev, phy_addr, MII_STATUS); | 1472 | status = mdio_read(net_dev, phy_addr, MII_STATUS); |
1473 | 1473 | ||
1474 | if (!(status & MII_STAT_LINK)) | 1474 | if (!(status & MII_STAT_LINK)) |