All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 11/15] dm: Fix printf() strings in the 'dm' command
Date: Wed, 11 Jun 2014 23:29:51 -0600	[thread overview]
Message-ID: <1402550995-15963-12-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1402550995-15963-1-git-send-email-sjg@chromium.org>

The values here are int, but the map_to_sysmem() call can return a long.
Add a cast to deal with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v6:
- Use ulong instead of uint for printing addresses

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to fix printf() strings in the 'dm' command

 test/dm/cmd_dm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index 180661b..aa8122c 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -23,7 +23,7 @@ static int display_succ(struct udevice *in, char *buf)
 	char local[16];
 	struct udevice *pos, *n, *prev = NULL;
 
-	printf("%s- %s @ %08x", buf, in->name, map_to_sysmem(in));
+	printf("%s- %s @ %08lx", buf, in->name, (ulong)map_to_sysmem(in));
 	if (in->flags & DM_FLAG_ACTIVATED)
 		puts(" - activated");
 	puts("\n");
@@ -62,7 +62,7 @@ static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
 	struct udevice *root;
 
 	root = dm_root();
-	printf("ROOT %08x\n", map_to_sysmem(root));
+	printf("ROOT %08lx\n", (ulong)map_to_sysmem(root));
 	return dm_dump(root);
 }
 
@@ -84,8 +84,8 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
 		for (ret = uclass_first_device(id, &dev);
 		     dev;
 		     ret = uclass_next_device(&dev)) {
-			printf("  %s @  %08x:\n", dev->name,
-			       map_to_sysmem(dev));
+			printf("  %s @ %08lx:\n", dev->name,
+			       (ulong)map_to_sysmem(dev));
 		}
 		puts("\n");
 	}
-- 
2.0.0.526.g5318336

  parent reply	other threads:[~2014-06-12  5:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12  5:29 [U-Boot] [PATCH v6 0/15] Collected driver model bug-fixes and docs Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 01/15] Add an I/O tracing feature Simon Glass
2014-06-20 20:27   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 02/15] arm: Support iotrace feature Simon Glass
2014-06-20 20:30   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 03/15] sandbox: " Simon Glass
2014-06-20 20:31   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 04/15] Makefile: Support include files for .dts files Simon Glass
2014-06-20 20:29   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 05/15] dm: Rename struct device_id to udevice_id Simon Glass
2014-06-20 20:30   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 06/15] dm: Update README to encourage conversion to driver model Simon Glass
2014-06-20 20:28   ` Simon Glass
2014-06-20 20:28   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 07/15] dm: Use case-insensitive comparison for GPIO banks Simon Glass
2014-06-20 20:31   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 08/15] dm: Add missing header files in lists and root Simon Glass
2014-06-20 20:32   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 09/15] dm: Cast away the const-ness of the global_data pointer Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 10/15] dm: Allow driver model tests only for sandbox Simon Glass
2014-06-20 20:32   ` Simon Glass
2014-06-12  5:29 ` Simon Glass [this message]
2014-06-20 20:33   ` [U-Boot] [PATCH v6 11/15] dm: Fix printf() strings in the 'dm' command Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 12/15] tegra: dts: Bring in GPIO bindings from linux Simon Glass
2014-06-20 20:35   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 13/15] tegra: Enable driver model Simon Glass
2014-06-20 20:35   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 14/15] dm: Tidy up four minor code nits Simon Glass
2014-06-20 20:36   ` Simon Glass
2014-06-12  5:29 ` [U-Boot] [PATCH v6 15/15] dm: Expand and improve the device lifecycle docs Simon Glass
2014-06-20 20:36   ` Simon Glass

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=1402550995-15963-12-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --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.