diff options
author | Cyril Chemparathy <cyril@ti.com> | 2012-09-12 10:19:05 -0400 |
---|---|---|
committer | Cyril Chemparathy <cyril@ti.com> | 2013-02-01 09:37:53 -0500 |
commit | 4dc17a8282221854896a0d6a83c758fde4f9b139 (patch) | |
tree | a8d664fd92a385e9b7de33caebcb558bc66a6834 | |
parent | ad96f0598a7a4d9977e2a94e10a7752a2c6d325c (diff) | |
download | linux-keystone-upstream/keystone-lpae-v4.tar.gz |
ARM: fix type of PHYS_PFN_OFFSET to unsigned longupstream/keystone-lpae-v4
On LPAE machines, PHYS_OFFSET evaluates to a phys_addr_t and this type is
inherited by the PHYS_PFN_OFFSET definition as well. Consequently, the kernel
build emits warnings of the form:
init/main.c: In function 'start_kernel':
init/main.c:588:7: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'phys_addr_t' [-Wformat]
This patch fixes this warning by pinning down the PFN type to unsigned long.
Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
-rw-r--r-- | arch/arm/include/asm/memory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index f3a7f765e97614..32e9e5aaa01aab 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -223,7 +223,7 @@ static inline unsigned long __phys_to_virt(unsigned long x) * direct-mapped view. We assume this is the first page * of RAM in the mem_map as well. */ -#define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) +#define PHYS_PFN_OFFSET ((unsigned long)(PHYS_OFFSET >> PAGE_SHIFT)) /* * These are *only* valid on the kernel direct mapped RAM memory. |