Skip to contentSkip to conversation

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

PATCH New Michael Ellerman 1 participant 1 message Jun 11, 2009 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix warning in setup_64.c when CONFIG_RELOCATABLE=y

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.

---
 arch/powerpc/kernel/setup_64.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/setup_64.c +2 -2
index f46548e..1f68160 100644
@@ -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");
Signature · 1 line
1.6.2.1