[U-Boot] [PATCH 2/4] mpc8xx: Correct cast of im_cpm.cp_dparam

Tom Rini trini at ti.com
Mon May 13 22:31:55 CEST 2013


We must cast this to unsigned char not unsigned short to avoid warnings.

Cc: Wolfgang Denk <wd at denx.de>
Signed-off-by: Tom Rini <trini at ti.com>
---
 arch/powerpc/cpu/mpc8xx/cpu.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index b6b733d..db98e82 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -78,7 +78,7 @@ static int check_CPU (long clock, uint pvr, uint immr)
 	if ((pvr >> 16) != 0x0050)
 		return -1;
 
-	k = (immr << 16) | *((ushort *) & immap->im_cpm.cp_dparam[0xB0]);
+	k = (immr << 16) | *((uchar *) & immap->im_cpm.cp_dparam[0xB0]);
 	m = 0;
 	suf = "";
 
@@ -194,7 +194,7 @@ static int check_CPU (long clock, uint pvr, uint immr)
 	if ((pvr >> 16) != 0x0050)
 		return -1;
 
-	k = (immr << 16) | *((ushort *) & immap->im_cpm.cp_dparam[0xB0]);
+	k = (immr << 16) | *((uchar *) & immap->im_cpm.cp_dparam[0xB0]);
 	m = 0;
 
 	switch (k) {
@@ -253,7 +253,7 @@ static int check_CPU (long clock, uint pvr, uint immr)
 	if ((pvr >> 16) != 0x0050)
 		return -1;
 
-	k = (immr << 16) | in_be16((ushort *)&immap->im_cpm.cp_dparam[0xB0]);
+	k = (immr << 16) | in_be16((uchar *)&immap->im_cpm.cp_dparam[0xB0]);
 	m = 0;
 
 	switch (k) {
@@ -312,7 +312,7 @@ static int check_CPU (long clock, uint pvr, uint immr)
 	if ((pvr >> 16) != 0x0050)
 		return -1;
 
-	k = (immr << 16) | *((ushort *) & immap->im_cpm.cp_dparam[0xB0]);
+	k = (immr << 16) | *((uchar *) & immap->im_cpm.cp_dparam[0xB0]);
 	m = 0;
 
 	switch (k) {
-- 
1.7.9.5



More information about the U-Boot mailing list