[e1000] Remove unused variable when ICR register is simply cleared
On reset and close, the ICR register is read to clear any pending interrupts, but the value is simply ignored. Avoid assigning the value to a variable, to inhibit a warning from gcc 4.6. Also fix a potential race condition in reset routines which clear interrupts before disabling them. Reported-by: Ralph Giles <giles@thaumas.net> Tested-by: Ralph Giles <giles@thaumas.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -639,14 +639,12 @@ static void igb_close ( struct net_device *netdev )
|
||||
struct igb_adapter *adapter = netdev_priv ( netdev );
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
uint32_t rctl;
|
||||
uint32_t icr;
|
||||
|
||||
DBGP ( "igb_close\n" );
|
||||
|
||||
/* Acknowledge interrupts */
|
||||
icr = E1000_READ_REG ( hw, E1000_ICR );
|
||||
|
||||
/* Disable and acknowledge interrupts */
|
||||
igb_irq_disable ( adapter );
|
||||
E1000_READ_REG ( hw, E1000_ICR );
|
||||
|
||||
/* disable receives */
|
||||
rctl = E1000_READ_REG ( hw, E1000_RCTL );
|
||||
|
||||
Reference in New Issue
Block a user