[PATCH 6/8] x86: Fix 64-bit compile warning

aiden.park at intel.com aiden.park at intel.com
Wed Apr 22 02:45:05 CEST 2020


From: Aiden Park <aiden.park at intel.com>

This is to fix pointer type cast warning in hob command.

Signed-off-by: Aiden Park <aiden.park at intel.com>
---
 cmd/x86/hob.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmd/x86/hob.c b/cmd/x86/hob.c
index 3967a7ca5a..8c2c1ffc63 100644
--- a/cmd/x86/hob.c
+++ b/cmd/x86/hob.c
@@ -36,14 +36,14 @@ static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	hdr = gd->arch.hob_list;
 
-	printf("HOB list address: 0x%08x\n\n", (unsigned int)hdr);
+	printf("HOB list address: 0x%p\n\n", hdr);
 
-	printf("#  | Address  | Type      | Len  | ");
+	printf("#  |          Address | Type      | Len  | ");
 	printf("%36s\n", "GUID");
-	printf("---|----------|-----------|------|-");
+	printf("---|------------------|-----------|------|-");
 	printf("------------------------------------\n");
 	while (!end_of_hob(hdr)) {
-		printf("%02x | %08x | ", i, (unsigned int)hdr);
+		printf("%02x | %p | ", i, hdr);
 		type = hdr->type;
 		if (type == HOB_TYPE_UNUSED)
 			desc = "*Unused*";
-- 
2.20.1



More information about the U-Boot mailing list