From patchwork Wed Nov 2 21:00:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9409881 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 DE10E60585 for ; Wed, 2 Nov 2016 21:04:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDA14297DD for ; Wed, 2 Nov 2016 21:04:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C13AE2A5C0; Wed, 2 Nov 2016 21:04:28 +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 AB049297DD for ; Wed, 2 Nov 2016 21:04:27 +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 1c22gR-0000YL-FQ; Wed, 02 Nov 2016 21:02:55 +0000 Received: from mail-qt0-f181.google.com ([209.85.216.181]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c22f3-0007qn-00 for linux-arm-kernel@lists.infradead.org; Wed, 02 Nov 2016 21:01:31 +0000 Received: by mail-qt0-f181.google.com with SMTP id n6so16745212qtd.1 for ; Wed, 02 Nov 2016 14:01:08 -0700 (PDT) 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=r6GqzlEx0tE0sD2+n4I/R/QCyhBqBRQm59Qiat+94ys=; b=NF8BjPPlH4fNuJOnNLRo+sFA0N4WzPkUx0NcVG2cnb8MLbdtwhn9xmMRCue/2bF7i3 Dm0nx4x5NG4madEIEK8ol3fRK7OlOjm7iT5HoK0StRwAjR39gDg1IElaoIqTYKRPpIsD WTVz+VOfTcMHHV/1iAZuknApKgbTghF4U49zCu4NJYOby4m26TDNugOGiD+UT0fOeO9H zoXbuig4cfnpjXChs/Jxex2sodIPE4I/6l0J4VCm2wzQT3n9LCMNAx4IKawoGr+QUAqn J74v9knRqjqhzG/CYZvImVug2fhZcR3zYc8B4QeWMILiHIdrJpK8H8+AoJm/5qbFs/qm k1Gw== X-Gm-Message-State: ABUngvcDIjLI8hxvqPtPjsaO6MW+K8cIgiO44ifCCNAzEoV6fgpmy4U74kntvA0NblfwmpSW X-Received: by 10.200.50.148 with SMTP id z20mr4838910qta.157.1478120467689; Wed, 02 Nov 2016 14:01:07 -0700 (PDT) Received: from X1-Carbon.redhat.com ([198.233.217.214]) by smtp.gmail.com with ESMTPSA id a54sm2193376qta.49.2016.11.02.14.01.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Nov 2016 14:01:06 -0700 (PDT) From: Laura Abbott To: Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas Subject: [PATCHv2 4/6] arm64: Add cast for virt_to_pfn Date: Wed, 2 Nov 2016 15:00:52 -0600 Message-Id: <20161102210054.16621-5-labbott@redhat.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161102210054.16621-1-labbott@redhat.com> References: <20161102210054.16621-1-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161102_140129_427157_7938966A X-CRM114-Status: GOOD ( 10.74 ) 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 --- 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 *