All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] dm: ppc: Fixup cpu.c warning in mpc8xx
@ 2012-07-27 20:00 Marek Vasut
  2012-07-27 20:56 ` Wolfgang Denk
  2012-07-27 22:57 ` [U-Boot] [PATCH V2] " Marek Vasut
  0 siblings, 2 replies; 8+ messages in thread
From: Marek Vasut @ 2012-07-27 20:00 UTC (permalink / raw)
  To: u-boot

cpu.c: In function ?check_CPU?:
cpu.c:256:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
---
 arch/powerpc/cpu/mpc8xx/cpu.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 5cbf9a6..e453245 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -41,6 +41,7 @@
 #include <netdev.h>
 #include <asm/cache.h>
 #include <linux/compiler.h>
+#include <asm/io.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
@@ -253,7 +254,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) | readw(&immap->im_cpm.cp_dparam[0xB0]);
 	m = 0;
 
 	switch (k) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-30  8:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-27 20:00 [U-Boot] [PATCH] dm: ppc: Fixup cpu.c warning in mpc8xx Marek Vasut
2012-07-27 20:56 ` Wolfgang Denk
2012-07-27 21:26   ` Marek Vasut
2012-07-27 22:14     ` Wolfgang Denk
2012-07-27 22:29       ` Marek Vasut
2012-07-27 22:57 ` [U-Boot] [PATCH V2] " Marek Vasut
2012-07-30  7:45   ` Wolfgang Denk
2012-07-30  8:02   ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.