Skip to contentSkip to conversation

ppc4xx: Fix compilation warning for canyonlands & glacier

PATCH New Stefan Roese 3 participants 3 messages Sep 5, 2008 – Sep 8, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: Fix compilation warning for canyonlands & glacier

---
 cpu/ppc4xx/miiphy.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
cpu/ppc4xx/miiphy.c +3 -7
index d303598..84b1bbe 100644
@@ -236,28 +236,24 @@ unsigned int miiphy_getemac_offset(u8 addr)
 #endif
 
 #if defined(CONFIG_460EX) || defined(CONFIG_460GT)
-	u32 mode_reg;
 	u32 eoffset = 0;
 
 	switch (addr) {
 #if defined(CONFIG_HAS_ETH1) && defined(CONFIG_GPCS_PHY1_ADDR)
 	case CONFIG_GPCS_PHY1_ADDR:
-		mode_reg = in_be32((void *)EMAC_M1 + 0x100);
-		if (addr == EMAC_M1_IPPA_GET(mode_reg))
+		if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 + 0x100)))
 			eoffset = 0x100;
 		break;
 #endif
 #if defined(CONFIG_HAS_ETH2) && defined(CONFIG_GPCS_PHY2_ADDR)
 	case CONFIG_GPCS_PHY2_ADDR:
-		mode_reg = in_be32((void *)EMAC_M1 + 0x300);
-		if (addr == EMAC_M1_IPPA_GET(mode_reg))
+		if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 + 0x300)))
 			eoffset = 0x300;
 		break;
 #endif
 #if defined(CONFIG_HAS_ETH3) && defined(CONFIG_GPCS_PHY3_ADDR)
 	case CONFIG_GPCS_PHY3_ADDR:
-		mode_reg = in_be32((void *)EMAC_M1 + 0x400);
-		if (addr == EMAC_M1_IPPA_GET(mode_reg))
+		if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 + 0x400)))
 			eoffset = 0x400;
 		break;
 #endif
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 ppc4xx: Fix compilation warning for canyonlands &glacier

Oops, Sorry Stefan my fault for introducing this.

Thanks for fixing this.

Regards

Victor Gallardo

-----Original Message-----
From: [email protected] [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Stefan Roese
Sent: Friday, September 05, 2008 5:13 AM
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx: Fix compilation warning for canyonlands &glacier

---
 cpu/ppc4xx/miiphy.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
cpu/ppc4xx/miiphy.c index renamed from cpu/ppc4xx/miiphy.c +0 -0

d303598..84b1bbe 100644

cpu/ppc4xx/miiphy.c +0 -0
@@ -236,28 +236,24 @@ unsigned int miiphy_getemac_offset(u8 addr)

#endif

#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
- u32 mode_reg;
u32 eoffset = 0;

switch (addr) {
#if defined(CONFIG_HAS_ETH1) && defined(CONFIG_GPCS_PHY1_ADDR)
case CONFIG_GPCS_PHY1_ADDR:
- mode_reg = in_be32((void *)EMAC_M1 + 0x100);
- if (addr == EMAC_M1_IPPA_GET(mode_reg))
+ if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
0x100)))
eoffset = 0x100;
break;
#endif
#if defined(CONFIG_HAS_ETH2) && defined(CONFIG_GPCS_PHY2_ADDR)
case CONFIG_GPCS_PHY2_ADDR:
- mode_reg = in_be32((void *)EMAC_M1 + 0x300);
- if (addr == EMAC_M1_IPPA_GET(mode_reg))
+ if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
0x300)))
eoffset = 0x300;
break;
#endif
#if defined(CONFIG_HAS_ETH3) && defined(CONFIG_GPCS_PHY3_ADDR)
case CONFIG_GPCS_PHY3_ADDR:
- mode_reg = in_be32((void *)EMAC_M1 + 0x400);
- if (addr == EMAC_M1_IPPA_GET(mode_reg))
+ if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
0x400)))
eoffset = 0x400;
break;
#endif
--
1.5.6.5

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#2 lore raw

PATCH 1/1 ppc4xx: Fix compilation warning for canyonlands &glacier

Dear "Victor Gallardo",

Quoted 2 lines · In message <0CA0A16855646F4FA96D25A158E299D604F7F04E@SDCEXCHANGE01.ad.amcc.com>…

Oops, Sorry Stefan my fault for introducing this.

...

Quoted 6 lines

#if defined(CONFIG_HAS_ETH1) && defined(CONFIG_GPCS_PHY1_ADDR)

(quoted diff) +1 -2
 	case CONFIG_GPCS_PHY1_ADDR:
-		mode_reg = in_be32((void *)EMAC_M1 + 0x100);
-		if (addr == EMAC_M1_IPPA_GET(mode_reg))
+		if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +

0x100)))

^^^^^^^^^^^^^^
Line wrapped.

Quoted 6 lines

#if defined(CONFIG_HAS_ETH2) && defined(CONFIG_GPCS_PHY2_ADDR)

(quoted diff) +1 -2
 	case CONFIG_GPCS_PHY2_ADDR:
-		mode_reg = in_be32((void *)EMAC_M1 + 0x300);
-		if (addr == EMAC_M1_IPPA_GET(mode_reg))
+		if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +

0x300)))

^^^^^^^^^^^^^^
Line wrapped.

Quoted 6 lines

#if defined(CONFIG_HAS_ETH3) && defined(CONFIG_GPCS_PHY3_ADDR)

(quoted diff) +1 -2
 	case CONFIG_GPCS_PHY3_ADDR:
-		mode_reg = in_be32((void *)EMAC_M1 + 0x400);
-		if (addr == EMAC_M1_IPPA_GET(mode_reg))
+		if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +

0x400)))

^^^^^^^^^^^^^^
Line wrapped.

Please fix your mailer setup and resubmit.

Best regards,

Wolfgang Denk

Signature · 6 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
I have never understood the female capacity to avoid a direct  answer
to any question.
	-- Spock, "This Side of Paradise", stardate 3417.3