[PATCH v3] Force printing of 'total_memory' to unsigned long long in ppc_mmu_32.c
Tony Breeds
tony at bakeyournoodle.com
Fri Aug 1 11:38:39 EST 2008
total_memory is a 'phys_addr_t', Which can be either 64 or 32 bits.
Force printing as unsigned long long to silence the warning.
Signed-off-by: Tony Breeds <tony at bakeyournoodle.com>
---
Changes since v1:
- correctly use 64bit type as phys_addr_t wont always be 32bits. Thanks to
sfr for showing me the error of my ways ;P
Changes since v2:
- correctly cast the result of the shift NOT just total_memory. Thanks Milton
for catching that.
arch/powerpc/mm/ppc_mmu_32.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index c53145f..6aa1208 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -236,8 +236,8 @@ void __init MMU_init_hw(void)
Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size);
- printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n",
- total_memory >> 20, Hash_size >> 10, Hash);
+ printk("Total memory = %lldMB; using %ldkB for hash table (at %p)\n",
+ (unsigned long long)(total_memory >> 20), Hash_size >> 10, Hash);
/*
--
1.5.6.3
More information about the Linuxppc-dev
mailing list