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

* [U-Boot] [PATCH] Fix compiler warning in fdt_support.c
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Albert ARIBAUD @ 2010-11-28  9:10 UTC (permalink / raw)
  To: u-boot

Le 21/11/2010 20:19, dirk.behme at googlemail.com a ?crit :
> 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;
>   	}

Maybe we could pull this patch in? That will raise the count of ARM 
boards building clean.

Amicalement,
-- 
Albert.

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

* [U-Boot] [PATCH] Fix compiler warning in fdt_support.c
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-11-28 11:42 UTC (permalink / raw)
  To: u-boot

Dear dirk.behme at googlemail.com,

In message <1290367174-380-1-git-send-email-dirk.behme@gmail.com> you wrote:
> 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'.

Applied, thank.

Gerry, hope this is OK with you.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I object to intellect without discipline;  I object to power without
constructive purpose.
	-- Spock, "The Squire of Gothos", stardate 2124.5

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

* [U-Boot] [PATCH] Fix compiler warning in fdt_support.c
  2010-11-28 11:42 ` Wolfgang Denk
@ 2010-11-28 17:30   ` Gerald Van Baren
  0 siblings, 0 replies; 4+ messages in thread
From: Gerald Van Baren @ 2010-11-28 17:30 UTC (permalink / raw)
  To: u-boot

On 11/28/2010 06:42 AM, Wolfgang Denk wrote:
> Dear dirk.behme at googlemail.com,
>
> In message<1290367174-380-1-git-send-email-dirk.behme@gmail.com>  you wrote:
>> 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'.
>
> Applied, thank.
>
> Gerry, hope this is OK with you.

Yes, thanks.

> Best regards,
> Wolfgang Denk

Best regards,
gvb

^ 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