summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-06-11 23:29:51 -0600
committerSimon Glass <sjg@chromium.org>2014-06-20 11:56:28 -0600
commit184b1b71751a447007a841f24093572ca4582e9b (patch)
tree49ec3f27448cd4313777fe6a3fddcdeb1c4ea3bf /test
parentb6a49a7ae71755396a2fa1e6dbde1ae3064d256f (diff)
downloadu-boot-imx-184b1b71751a447007a841f24093572ca4582e9b.zip
u-boot-imx-184b1b71751a447007a841f24093572ca4582e9b.tar.gz
u-boot-imx-184b1b71751a447007a841f24093572ca4582e9b.tar.bz2
dm: Fix printf() strings in the 'dm' command
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>
Diffstat (limited to 'test')
-rw-r--r--test/dm/cmd_dm.c8
1 files 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");
}