Commit 184b1b71751a447007a841f24093572ca4582e9b
1 parent
b6a49a7ae7
Exists in
v2017.01-smarct4x
and in
40 other branches
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>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
test/dm/cmd_dm.c
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | char local[16]; |
24 | 24 | struct udevice *pos, *n, *prev = NULL; |
25 | 25 | |
26 | - printf("%s- %s @ %08x", buf, in->name, map_to_sysmem(in)); | |
26 | + printf("%s- %s @ %08lx", buf, in->name, (ulong)map_to_sysmem(in)); | |
27 | 27 | if (in->flags & DM_FLAG_ACTIVATED) |
28 | 28 | puts(" - activated"); |
29 | 29 | puts("\n"); |
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | struct udevice *root; |
63 | 63 | |
64 | 64 | root = dm_root(); |
65 | - printf("ROOT %08x\n", map_to_sysmem(root)); | |
65 | + printf("ROOT %08lx\n", (ulong)map_to_sysmem(root)); | |
66 | 66 | return dm_dump(root); |
67 | 67 | } |
68 | 68 | |
... | ... | @@ -84,8 +84,8 @@ |
84 | 84 | for (ret = uclass_first_device(id, &dev); |
85 | 85 | dev; |
86 | 86 | ret = uclass_next_device(&dev)) { |
87 | - printf(" %s @ %08x:\n", dev->name, | |
88 | - map_to_sysmem(dev)); | |
87 | + printf(" %s @ %08lx:\n", dev->name, | |
88 | + (ulong)map_to_sysmem(dev)); | |
89 | 89 | } |
90 | 90 | puts("\n"); |
91 | 91 | } |