summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/memory.h
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2017-01-10 13:35:48 -0800
committerWill Deacon <will.deacon@arm.com>2017-01-12 15:05:39 +0000
commit869dcfd10dfe59484cf14acddf264656d5ee94ea (patch)
treedd78b9d3b4b2769f2161eb02580919ab7beb10ab /arch/arm64/include/asm/memory.h
parent9e22eb616f861a25e3123d1221bad61f8f132913 (diff)
downloadtalos-obmc-linux-869dcfd10dfe59484cf14acddf264656d5ee94ea.tar.gz
talos-obmc-linux-869dcfd10dfe59484cf14acddf264656d5ee94ea.zip
arm64: Add cast for virt_to_pfn
virt_to_pfn lacks a cast at the top level. Don't rely on __virt_to_phys and explicitly cast to unsigned long. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/memory.h')
-rw-r--r--arch/arm64/include/asm/memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index f80a8e403847..cd6e3eec0efe 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -209,7 +209,7 @@ static inline void *phys_to_virt(phys_addr_t x)
#define __pa(x) __virt_to_phys((unsigned long)(x))
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
-#define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys(x))
+#define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys((unsigned long)(x)))
/*
* virt_to_page(k) convert a _valid_ virtual address to struct page *
OpenPOWER on IntegriCloud