From: Stefan Roese Date: Mon, 7 Sep 2009 08:52:24 +0000 (+0200) Subject: ppc4xx: Fix compilation warning in 4xx miiphy.c X-Git-Tag: v2010.09-rc1~28^2~7^2~42^2~137 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ed51257e2a1e0a6e37cfbd2b116a4d674d678db2;p=u-boot ppc4xx: Fix compilation warning in 4xx miiphy.c 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 --- diff --git a/cpu/ppc4xx/miiphy.c b/cpu/ppc4xx/miiphy.c index 6a92bf8364..fa3bfc8d9f 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; }