summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorZang Roy-R61911 <tie-fei.zang@freescale.com>2011-11-06 22:22:36 +0000
committerWolfgang Denk <wd@denx.de>2011-11-17 10:00:27 +0100
commit56b13b1e06473d189bc202eb8a541d673fd20247 (patch)
treec14fa7efa71b668c16b0e61f75a0ddddd4d2cb8e /drivers/net
parenta22481febed5cf6bb1b8f0afb86c1772a153229a (diff)
downloadu-boot-imx-56b13b1e06473d189bc202eb8a541d673fd20247.zip
u-boot-imx-56b13b1e06473d189bc202eb8a541d673fd20247.tar.gz
u-boot-imx-56b13b1e06473d189bc202eb8a541d673fd20247.tar.bz2
e1000: fix unused variable waring for e1000 driver
Fix the following build warning in drivers/net/e1000.c e1000.c: In function 'e1000_reset_hw': e1000.c:1373:11: warning: variable 'icr' set but not used [-Wunused-but-set-variable] e1000.c: In function 'e1000_phy_init_script': e1000.c:4395:11: warning: variable 'ret_val' set but not used [-Wunused-but-set-variable] Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 6eab7b2..6b71bd9 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -1370,7 +1370,6 @@ e1000_reset_hw(struct e1000_hw *hw)
{
uint32_t ctrl;
uint32_t ctrl_ext;
- uint32_t icr;
uint32_t manc;
uint32_t pba = 0;
@@ -1443,7 +1442,7 @@ e1000_reset_hw(struct e1000_hw *hw)
E1000_WRITE_REG(hw, IMC, 0xffffffff);
/* Clear any pending interrupt events. */
- icr = E1000_READ_REG(hw, ICR);
+ E1000_READ_REG(hw, ICR);
/* If MWI was previously enabled, reenable it. */
if (hw->mac_type == e1000_82542_rev2_0) {
@@ -4447,7 +4446,8 @@ e1000_phy_init_script(struct e1000_hw *hw)
mdelay(20);
/* Now enable the transmitter */
- e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
+ if (!ret_val)
+ e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
if (hw->mac_type == e1000_82547) {
uint16_t fused, fine, coarse;