diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-01-06 10:02:53 +0300 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-01-24 11:13:56 +0300 |
commit | 90da06692532541a38f9857972e1fd6b1cdfb45a (patch) | |
tree | b57994ef65c615e0cf34a57f692fed67b95f3dd1 /drivers/net/e1000e/lib.c | |
parent | 67fd4fcb78a7ced369a6bd8a131ec8c65ebd2bbb (diff) | |
download | linux-90da06692532541a38f9857972e1fd6b1cdfb45a.tar.xz |
e1000e: reduce scope of some variables, remove unnecessary ones
Static analysis of the driver code found some variables for which the scope
can be reduced, or remove the variable altogether.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e/lib.c')
-rw-r--r-- | drivers/net/e1000e/lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c index 68aa1749bf66..96921de5df2e 100644 --- a/drivers/net/e1000e/lib.c +++ b/drivers/net/e1000e/lib.c @@ -1978,15 +1978,15 @@ static s32 e1000_ready_nvm_eeprom(struct e1000_hw *hw) { struct e1000_nvm_info *nvm = &hw->nvm; u32 eecd = er32(EECD); - u16 timeout = 0; u8 spi_stat_reg; if (nvm->type == e1000_nvm_eeprom_spi) { + u16 timeout = NVM_MAX_RETRY_SPI; + /* Clear SK and CS */ eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); ew32(EECD, eecd); udelay(1); - timeout = NVM_MAX_RETRY_SPI; /* * Read "Status Register" repeatedly until the LSB is cleared. |