mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 05:50:52 +07:00
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>
This commit is contained in:
parent
84dd619e4d
commit
f3be974271
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user