mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-03 17:43:45 +08:00
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>
This commit is contained in:
parent
82379b5564
commit
0b34dbbd0b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user