diff mbox

[4/5] Use %p in format for pointers

Message ID 1318543601-20819-5-git-send-email-loic.minier@linaro.org
State New
Headers show

Commit Message

loic.minier@linaro.org Oct. 13, 2011, 10:06 p.m. UTC
res->start and res->size are resource_type_t which is a phys_addr_t
which itself could someday be a 64-bits pointer (for instance when
building sandbox on a 64-bits host).  Instead of hardcoding %08x as a
format for pointers, use the %p format.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
---
 drivers/base/driver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 0b80103..515ff8d 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -349,8 +349,8 @@  static int do_devinfo(struct command *cmdtp, int argc, char *argv[])
 			printf("num   : %d\n", i);
 			if (res->name)
 				printf("name  : %s\n", res->name);
-			printf("start : 0x%08x\nsize  : 0x%08x\n",
-			       res->start, res->size);
+			printf("start : 0x%p\nsize  : 0x%p\n",
+			       (void *)res->start, (void *)res->size);
 		}
 
 		printf("driver: %s\n\n", dev->driver ?