[U-Boot] [PATCH 3/3] sandbox: Properly print physical addresses

Thierry Reding thierry.reding at gmail.com
Tue Mar 12 10:38:02 UTC 2019


From: Thierry Reding <treding at nvidia.com>

Use the %pap printf specifier to print physical addresses. The physical
address is passed by reference and hence avoids the need to play tricks
with the preprocessor to use the correct specifier.

Signed-off-by: Thierry Reding <treding at nvidia.com>
---
 arch/sandbox/lib/pci_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c
index 5039973cd7af..01822c606956 100644
--- a/arch/sandbox/lib/pci_io.c
+++ b/arch/sandbox/lib/pci_io.c
@@ -34,7 +34,7 @@ int pci_map_physmem(phys_addr_t paddr, unsigned long *lenp,
 		return 0;
 	}
 
-	debug("%s: failed: addr=%x\n", __func__, paddr);
+	debug("%s: failed: addr=%pap\n", __func__, &paddr);
 	return -ENOSYS;
 }
 
-- 
2.20.1



More information about the U-Boot mailing list