Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1555943
| From | Laura Abbott <labbott@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHv7 09/11] arm64: Add cast for virt_to_pfn |
| Date | 2017-01-10 22:40 +0100 |
| Message-ID | <sYcj8-6ul-53@gated-at.bofh.it> (permalink) |
| References | <sYcj7-6ul-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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> --- arch/arm64/include/asm/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index f80a8e4..cd6e3ee 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 * -- 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv7 00/11] CONFIG_DEBUG_VIRTUAL for arm64 Laura Abbott <labbott@redhat.com> - 2017-01-10 22:40 +0100 [PATCHv7 11/11] arm64: Add support for CONFIG_DEBUG_VIRTUAL Laura Abbott <labbott@redhat.com> - 2017-01-10 22:40 +0100 [PATCHv7 06/11] mm/usercopy: Switch to using lm_alias Laura Abbott <labbott@redhat.com> - 2017-01-10 22:40 +0100 [PATCHv7 09/11] arm64: Add cast for virt_to_pfn Laura Abbott <labbott@redhat.com> - 2017-01-10 22:40 +0100 [PATCHv7 02/11] mm/cma: Cleanup highmem check Laura Abbott <labbott@redhat.com> - 2017-01-10 22:40 +0100 [PATCHv7 08/11] arm64: Move some macros under #ifndef __ASSEMBLY__ Laura Abbott <labbott@redhat.com> - 2017-01-10 22:40 +0100 [PATCHv7 10/11] arm64: Use __pa_symbol for kernel symbols Laura Abbott <labbott@redhat.com> - 2017-01-10 22:40 +0100 Re: [PATCHv7 00/11] CONFIG_DEBUG_VIRTUAL for arm64 Will Deacon <will.deacon@arm.com> - 2017-01-12 18:40 +0100
csiph-web