From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id 1EACB6B026B for ; Tue, 10 Jan 2017 16:36:28 -0500 (EST) Received: by mail-qt0-f197.google.com with SMTP id k15so129092004qtg.5 for ; Tue, 10 Jan 2017 13:36:28 -0800 (PST) Received: from mail-qk0-f173.google.com (mail-qk0-f173.google.com. [209.85.220.173]) by mx.google.com with ESMTPS id f47si2258999qtc.221.2017.01.10.13.36.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 13:36:27 -0800 (PST) Received: by mail-qk0-f173.google.com with SMTP id 11so90661225qkl.3 for ; Tue, 10 Jan 2017 13:36:27 -0800 (PST) From: Laura Abbott Subject: [PATCHv7 09/11] arm64: Add cast for virt_to_pfn Date: Tue, 10 Jan 2017 13:35:48 -0800 Message-Id: <1484084150-1523-10-git-send-email-labbott@redhat.com> In-Reply-To: <1484084150-1523-1-git-send-email-labbott@redhat.com> References: <1484084150-1523-1-git-send-email-labbott@redhat.com> Sender: owner-linux-mm@kvack.org List-ID: To: Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas , Florian Fainelli Cc: Laura Abbott , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Marek Szyprowski , Joonsoo Kim , linux-arm-kernel@lists.infradead.org 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 Tested-by: Mark Rutland Signed-off-by: Laura Abbott --- 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org