All of lore.kernel.org
 help / color / mirror / Atom feed
From: dirk.behme at googlemail.com <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Fix compiler warning in fdt_support.c
Date: Sun, 21 Nov 2010 20:19:34 +0100	[thread overview]
Message-ID: <1290367174-380-1-git-send-email-dirk.behme@gmail.com> (raw)

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;
 	}

             reply	other threads:[~2010-11-21 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 19:19 dirk.behme at googlemail.com [this message]
2010-11-28  9:10 ` [U-Boot] [PATCH] Fix compiler warning in fdt_support.c Albert ARIBAUD
2010-11-28 11:42 ` Wolfgang Denk
2010-11-28 17:30   ` Gerald Van Baren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290367174-380-1-git-send-email-dirk.behme@gmail.com \
    --to=dirk.behme@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.