* [U-Boot] [PATCH] ppc4xx: Fix compilation warning in 4xx miiphy.c
@ 2009-09-07 11:08 Stefan Roese
2009-09-08 9:03 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2009-09-07 11:08 UTC (permalink / raw)
To: u-boot
This patch fixes the following compilation warning:
miiphy.c: In function 'emac4xx_miiphy_read':
miiphy.c:353: warning: dereferencing type-punned pointer will break
strict-aliasing rules
Signed-off-by: Stefan Roese <sr@denx.de>
---
cpu/ppc4xx/miiphy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpu/ppc4xx/miiphy.c b/cpu/ppc4xx/miiphy.c
index 6a92bf8..fa3bfc8 100644
--- a/cpu/ppc4xx/miiphy.c
+++ b/cpu/ppc4xx/miiphy.c
@@ -350,7 +350,7 @@ int emac4xx_miiphy_read (char *devname, unsigned char addr, unsigned char reg,
return -1;
sta_reg = in_be32((void *)EMAC_STACR + emac_reg);
- *value = *(u16 *)(&sta_reg);
+ *value = sta_reg >> 16;
return 0;
}
--
1.6.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] ppc4xx: Fix compilation warning in 4xx miiphy.c
2009-09-07 11:08 [U-Boot] [PATCH] ppc4xx: Fix compilation warning in 4xx miiphy.c Stefan Roese
@ 2009-09-08 9:03 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-09-08 9:03 UTC (permalink / raw)
To: u-boot
On Monday 07 September 2009 13:08:35 Stefan Roese wrote:
> This patch fixes the following compilation warning:
>
> miiphy.c: In function 'emac4xx_miiphy_read':
> miiphy.c:353: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
Applied to ppc4xx. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-08 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-07 11:08 [U-Boot] [PATCH] ppc4xx: Fix compilation warning in 4xx miiphy.c Stefan Roese
2009-09-08 9:03 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox