diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2013-01-05 00:08:37 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-01-27 05:15:48 -0500 |
commit | 70806a7fd1ae8942675bb2d415899e9e64440505 (patch) | |
tree | c49ab01f3a85c8fa2ccbd1cb4ac0961b62bcd298 /drivers/net/ethernet/intel/e1000e/82571.c | |
parent | 7dbbe5d5a5073d590790007d5b98d7fd51fd2ff5 (diff) |
e1000e: cleanup: do not assign a variable a value when not necessary
Static analysis with cppcheck has shown a few instances of a variable
being reassigned a value before the old one has been used. None of these
ever require the old value to be used so remove the old values.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/82571.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/82571.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c index d48143fefbfe..0f55d79afe39 100644 --- a/drivers/net/ethernet/intel/e1000e/82571.c +++ b/drivers/net/ethernet/intel/e1000e/82571.c | |||
@@ -1397,7 +1397,7 @@ bool e1000_check_phy_82574(struct e1000_hw *hw) | |||
1397 | { | 1397 | { |
1398 | u16 status_1kbt = 0; | 1398 | u16 status_1kbt = 0; |
1399 | u16 receive_errors = 0; | 1399 | u16 receive_errors = 0; |
1400 | s32 ret_val = 0; | 1400 | s32 ret_val; |
1401 | 1401 | ||
1402 | /* Read PHY Receive Error counter first, if its is max - all F's then | 1402 | /* Read PHY Receive Error counter first, if its is max - all F's then |
1403 | * read the Base1000T status register If both are max then PHY is hung. | 1403 | * read the Base1000T status register If both are max then PHY is hung. |
@@ -1542,7 +1542,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw) | |||
1542 | 1542 | ||
1543 | ctrl = er32(CTRL); | 1543 | ctrl = er32(CTRL); |
1544 | status = er32(STATUS); | 1544 | status = er32(STATUS); |
1545 | rxcw = er32(RXCW); | 1545 | er32(RXCW); |
1546 | /* SYNCH bit and IV bit are sticky */ | 1546 | /* SYNCH bit and IV bit are sticky */ |
1547 | udelay(10); | 1547 | udelay(10); |
1548 | rxcw = er32(RXCW); | 1548 | rxcw = er32(RXCW); |
@@ -1812,7 +1812,7 @@ static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw) | |||
1812 | static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw) | 1812 | static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw) |
1813 | { | 1813 | { |
1814 | if (hw->mac.type == e1000_82571) { | 1814 | if (hw->mac.type == e1000_82571) { |
1815 | s32 ret_val = 0; | 1815 | s32 ret_val; |
1816 | 1816 | ||
1817 | /* If there's an alternate MAC address place it in RAR0 | 1817 | /* If there's an alternate MAC address place it in RAR0 |
1818 | * so that it will override the Si installed default perm | 1818 | * so that it will override the Si installed default perm |