diff options
author | Stefan Roese <sr@denx.de> | 2009-09-07 08:52:24 (GMT) |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2009-09-10 12:38:17 (GMT) |
commit | 0b34dbbd0b6969c98c44313b291836d9056ec40a (patch) | |
tree | a8c512745b59f005b0a71be46103e54cce804932 /cpu/ppc4xx | |
parent | 82379b5564819e62624a3c58fbc43f1afedf4f5f (diff) | |
download | u-boot-0b34dbbd0b6969c98c44313b291836d9056ec40a.tar.xz |
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 <sr@denx.de>
Diffstat (limited to 'cpu/ppc4xx')
-rw-r--r-- | 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; } |