Skip to content

Commit

Permalink
powerpc/prom: fix early DEBUG messages
Browse files Browse the repository at this point in the history
[ Upstream commit b18f0ae92b0a1db565c3e505fa87b6971ad3b641 ]

This patch fixes early DEBUG messages in prom.c:
- Use %px instead of %p to see the addresses
- Cast memblock_phys_mem_size() with (unsigned long long) to
avoid build failure when phys_addr_t is not 64 bits.

Signed-off-by: Christophe Leroy <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
chleroy authored and gregkh committed Dec 5, 2019
1 parent b92e5db commit d02f0fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void __init move_device_tree(void)
p = __va(memblock_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");
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -749,7 +749,7 @@ void __init early_init_devtree(void *params)
memblock_allow_resize();
memblock_dump_all();

DBG("Phys. mem: %llx\n", memblock_phys_mem_size());
DBG("Phys. mem: %llx\n", (unsigned long long)memblock_phys_mem_size());

/* We may need to relocate the flat tree, do it now.
* FIXME .. and the initrd too? */
Expand Down

0 comments on commit d02f0fc

Please sign in to comment.