This patch fixes early DEBUG messages in prom.c:
- Use %px instead of %p to see the addresses
- Use %x instead of %llx when phys_addr_t is not 64 bits.

Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr>
---
 arch/powerpc/kernel/prom.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index fe758cedb93f..d8e56e03c9c6 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -129,7 +129,7 @@ static void __init move_device_tree(void)
                p = __va(memblock_phys_alloc(size, PAGE_SIZE));
                memcpy(p, initial_boot_params, size);
                initial_boot_params = p;
-               DBG("Moved device tree to 0x%p\n", p);
+               DBG("Moved device tree to 0x%px\n", p);
        }
 
        DBG("<- move_device_tree\n");
@@ -689,7 +689,7 @@ void __init early_init_devtree(void *params)
 {
        phys_addr_t limit;
 
-       DBG(" -> early_init_devtree(%p)\n", params);
+       DBG(" -> early_init_devtree(%px)\n", params);
 
        /* Too early to BUG_ON(), do it by hand */
        if (!early_init_dt_verify(params))
@@ -749,7 +749,11 @@ void __init early_init_devtree(void *params)
        memblock_allow_resize();
        memblock_dump_all();
 
+#ifdef CONFIG_PHYS_64BIT
        DBG("Phys. mem: %llx\n", memblock_phys_mem_size());
+#else
+       DBG("Phys. mem: %x\n", memblock_phys_mem_size());
+#endif
 
        /* We may need to relocate the flat tree, do it now.
         * FIXME .. and the initrd too? */
-- 
2.13.3

Reply via email to