sandbox: Properly print physical addresses
authorThierry Reding <treding@nvidia.com>
Tue, 12 Mar 2019 10:38:02 +0000 (11:38 +0100)
committerSimon Glass <sjg@chromium.org>
Fri, 12 Apr 2019 02:10:05 +0000 (20:10 -0600)
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@nvidia.com>
arch/sandbox/lib/pci_io.c

index 5039973cd7aff9e2c4aa365be5879725d99ea132..01822c606956cb04e74fd425afca688f2c331cb4 100644 (file)
@@ -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;
 }