Skip to contentSkip to conversation

net: e1000: fix gcc 4.6 compiler warnings

PATCH New Kim Phillips 2 participants 2 messages Nov 16, 2011 – Nov 17, 2011 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: e1000: fix gcc 4.6 compiler warnings

Configuring for caddy2 - Board: vme8349, Options: CADDY2
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]

---
 drivers/net/e1000.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/net/e1000.c +2 -4
index 6eab7b2..3541c4c 100644
@@ -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) {
@@ -4392,7 +4391,6 @@ e1000_phy_hw_reset(struct e1000_hw *hw)
 static void
 e1000_phy_init_script(struct e1000_hw *hw)
 {
-	uint32_t ret_val;
 	uint16_t phy_saved_data;
 	DEBUGFUNC();
 
@@ -4401,7 +4399,7 @@ e1000_phy_init_script(struct e1000_hw *hw)
 
 		/* Save off the current value of register 0x2F5B to be
 		 * restored at the end of this routine. */
-		ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+		e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
 
 		/* Disabled the PHY transmitter */
 		e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 net: e1000: fix gcc 4.6 compiler warnings

Dear Kim Phillips,

Quoted 10 lines · In message <[email protected]> you…

Configuring for caddy2 - Board: vme8349, Options: CADDY2
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]

---
 drivers/net/e1000.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

Thanks, but this has already been fixed by Roy Zang's patch:
11/07 Roy Zang [PATCH] e1000: fix unused variable waring for e1000 driver
Gmane: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/115716
Patchwork: 124011 Accepted [U-Boot] e1000: fix unused variable waring for e1000 driver

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Too many people are ready to carry the stool when the piano needs  to
be moved.