mirror of
https://github.com/ipxe/ipxe
synced 2026-01-07 12:41: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:
@@ -841,7 +841,7 @@ static s32 e1000e_get_link_up_info_80003es2lan(struct e1000_hw *hw, u16 *speed,
|
||||
**/
|
||||
static s32 e1000e_reset_hw_80003es2lan(struct e1000_hw *hw)
|
||||
{
|
||||
u32 ctrl, icr;
|
||||
u32 ctrl;
|
||||
s32 ret_val;
|
||||
|
||||
/*
|
||||
@@ -875,7 +875,7 @@ static s32 e1000e_reset_hw_80003es2lan(struct e1000_hw *hw)
|
||||
|
||||
/* Clear any pending interrupt events. */
|
||||
ew32(IMC, 0xffffffff);
|
||||
icr = er32(ICR);
|
||||
er32(ICR);
|
||||
|
||||
ret_val = e1000e_check_alt_mac_addr_generic(hw);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user