[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:
Michael Brown
2011-03-16 18:58:52 +00:00
parent d94e62ded4
commit c018d57803
12 changed files with 24 additions and 30 deletions

View File

@@ -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);