mirror of
https://github.com/ipxe/ipxe
synced 2026-01-16 04:08:31 +03:00
[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:
@@ -666,12 +666,12 @@ static void igbvf_close ( struct net_device *netdev )
|
||||
struct igbvf_adapter *adapter = netdev_priv ( netdev );
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
uint32_t rxdctl;
|
||||
uint32_t icr;
|
||||
|
||||
DBG ( "igbvf_close\n" );
|
||||
icr = er32(EICR);
|
||||
|
||||
/* Disable and acknowledge interrupts */
|
||||
igbvf_irq_disable ( adapter );
|
||||
er32(EICR);
|
||||
|
||||
/* disable receives */
|
||||
rxdctl = er32 ( RXDCTL(0) );
|
||||
|
||||
Reference in New Issue
Block a user