[U-Boot] [PATCH 01/11] powerpc: fix io.h build warning with CONFIG_PHYS_64BIT

Becky Bruce beckyb at kernel.crashing.org
Thu Dec 4 06:04:37 CET 2008


Casting a pointer to a phys_addr_t when it's an unsigned long long
on a 32-bit system without first casting to a non-pointer type
generates a compiler warning. Fix this.

Signed-off-by: Becky Bruce <beckyb at kernel.crashing.org>
---
 include/asm-ppc/io.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index a8003ef..4ddad26 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -311,7 +311,7 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
 #ifdef CONFIG_ADDR_MAP
 	return addrmap_virt_to_phys(vaddr);
 #else
-	return (phys_addr_t)(vaddr);
+	return (phys_addr_t)((unsigned long)vaddr);
 #endif
 }
 
-- 
1.5.6.5



More information about the U-Boot mailing list