public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Fix compiler warning in fdt_support.c
@ 2010-11-21 19:19 dirk.behme at googlemail.com
  2010-11-28  9:10 ` Albert ARIBAUD
  2010-11-28 11:42 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: dirk.behme at googlemail.com @ 2010-11-21 19:19 UTC (permalink / raw)
  To: u-boot

From: Dirk Behme <dirk.behme@googlemail.com>

Fix compiler warning

fdt_support.c: In function 'of_bus_default_count_cells':
fdt_support.c:957: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type
fdt_support.c:965: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type

be32_to_cpup() expects an 'u32 *' while prop is 'const u32 *'.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>

---

Found while building 'omap3_beagle'.

 common/fdt_support.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: u-boot.git/common/fdt_support.c
===================================================================
--- u-boot.git.orig/common/fdt_support.c
+++ u-boot.git/common/fdt_support.c
@@ -954,7 +954,7 @@ static void of_bus_default_count_cells(v
 	if (addrc) {
 		prop = fdt_getprop(blob, parentoffset, "#address-cells", NULL);
 		if (prop)
-			*addrc = be32_to_cpup(prop);
+			*addrc = be32_to_cpup((u32 *)prop);
 		else
 			*addrc = 2;
 	}
@@ -962,7 +962,7 @@ static void of_bus_default_count_cells(v
 	if (sizec) {
 		prop = fdt_getprop(blob, parentoffset, "#size-cells", NULL);
 		if (prop)
-			*sizec = be32_to_cpup(prop);
+			*sizec = be32_to_cpup((u32 *)prop);
 		else
 			*sizec = 1;
 	}

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

end of thread, other threads:[~2010-11-28 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-21 19:19 [U-Boot] [PATCH] Fix compiler warning in fdt_support.c dirk.behme at googlemail.com
2010-11-28  9:10 ` Albert ARIBAUD
2010-11-28 11:42 ` Wolfgang Denk
2010-11-28 17:30   ` Gerald Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox