Patchwork powerpc: Fix warning in setup_64.c when CONFIG_RELOCATABLE=y

login
register
mail settings
Submitter Michael Ellerman
Date June 11, 2009, 5:05 a.m.
Message ID <f91eeceb158ac9661094de2c73fb0d21febdbe06.1244696691.git.michael@ellerman.id.au>
Download mbox | patch
Permalink /patch/28548/
State Accepted
Commit e468455e5845f83950d1271a6cd0425b9c7290ab
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Michael Ellerman - June 11, 2009, 5:05 a.m.
When CONFIG_RELOCATABLE is enabled, PHYSICAL_START is actually a
variable of type phys_addr_t. That means to print it we need to
cast to unsigned long long and use llx.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/setup_64.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index f46548e..1f68160 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -424,8 +424,8 @@  void __init setup_system(void)
 	printk("htab_hash_mask                = 0x%lx\n", htab_hash_mask);
 #endif /* CONFIG_PPC_STD_MMU_64 */
 	if (PHYSICAL_START > 0)
-		printk("physical_start                = 0x%lx\n",
-		       PHYSICAL_START);
+		printk("physical_start                = 0x%llx\n",
+		       (unsigned long long)PHYSICAL_START);
 	printk("-----------------------------------------------------\n");
 
 	DBG(" <- setup_system()\n");