[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:
@@ -304,7 +304,7 @@ void e1000_init_function_pointers_82541(struct e1000_hw *hw)
|
||||
**/
|
||||
static s32 e1000_reset_hw_82541(struct e1000_hw *hw)
|
||||
{
|
||||
u32 ledctl, ctrl, icr, manc;
|
||||
u32 ledctl, ctrl, manc;
|
||||
|
||||
DEBUGFUNC("e1000_reset_hw_82541");
|
||||
|
||||
@@ -368,7 +368,7 @@ static s32 e1000_reset_hw_82541(struct e1000_hw *hw)
|
||||
E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF);
|
||||
|
||||
/* Clear any pending interrupt events. */
|
||||
icr = E1000_READ_REG(hw, E1000_ICR);
|
||||
E1000_READ_REG(hw, E1000_ICR);
|
||||
|
||||
return E1000_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user