From patchwork Fri Nov 18 01:16:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9435621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E685660471 for ; Fri, 18 Nov 2016 01:20:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5E5928DAD for ; Fri, 18 Nov 2016 01:20:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9C4C296E5; Fri, 18 Nov 2016 01:20:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5802328DAD for ; Fri, 18 Nov 2016 01:20:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7Xp6-00083U-TB; Fri, 18 Nov 2016 01:18:36 +0000 Received: from mail-it0-f41.google.com ([209.85.214.41]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7Xo3-0007WB-Ju for linux-arm-kernel@lists.infradead.org; Fri, 18 Nov 2016 01:17:34 +0000 Received: by mail-it0-f41.google.com with SMTP id y23so7175794itc.0 for ; Thu, 17 Nov 2016 17:17:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fLzWpdOoMCzs/h/pNgm6kwW67cmKEZ/QRDaqEuUAaNg=; b=a7X9sW+nOGYMrlvmu1QUy5c7apkDyKyyZHYK3JVyQ7xZy6fORzocbdFCap2qMPIDIf AXMCxAnEDLpqAZ+Icmb7HeSB86VXKFvlzNMbmDQgF5HAhcP8A8ZGEnTEkmMVMGX6oNKY 4h4VaNJPSrXHvJrtnRONe1S0NKLDTTuWCd9OXunPLauwdVtuFzHYXnJwib75+Hlc/gBD uX7Wf5XwSNVxWYQj3ZS+tiweYKahRJ6FWQQBeGHWakoB9qcBNJUuS1PTZK+rsGl9bE6A C8R7TP+ef4hF9Dkwx+u881H87GS/hCj3r+Usc3wwW5DrkJq0UI0/scQvFwvlT6gaZsP6 0rmQ== X-Gm-Message-State: ABUngvfDFrqUU6u+r3tuPnRpIM8NDzygnfjHHltzdiHujFotgu5DNQS+N+NDofnAkdzGj93+ X-Received: by 10.36.105.5 with SMTP id e5mr6715550itc.75.1479431830425; Thu, 17 Nov 2016 17:17:10 -0800 (PST) Received: from labbott-redhat-machine.redhat.com ([2601:602:9800:177f::df9b]) by smtp.gmail.com with ESMTPSA id i8sm254953itc.11.2016.11.17.17.17.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 17:17:09 -0800 (PST) From: Laura Abbott To: Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas Subject: [PATCHv3 4/6] arm64: Add cast for virt_to_pfn Date: Thu, 17 Nov 2016 17:16:54 -0800 Message-Id: <1479431816-5028-5-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479431816-5028-1-git-send-email-labbott@redhat.com> References: <1479431816-5028-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161117_171732_073191_EA6C46AA X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Ingo Molnar , "H. Peter Anvin" , Joonsoo Kim , Thomas Gleixner , Laura Abbott , Andrew Morton , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP virt_to_pfn lacks a cast at the top level. Don't rely on __virt_to_phys and explicitly cast to unsigned long. Signed-off-by: Laura Abbott --- v3: No change --- 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 b4d2b32..d773e2c 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -204,7 +204,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 *