From patchwork Tue Jan 10 21:35:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9508589 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 48D2A606E1 for ; Tue, 10 Jan 2017 21:43:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A671285CA for ; Tue, 10 Jan 2017 21:43:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EF50285CC; Tue, 10 Jan 2017 21:43:05 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D806A285CA for ; Tue, 10 Jan 2017 21:43:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cR4C5-0000FP-18; Tue, 10 Jan 2017 21:43:01 +0000 Received: from mail-qk0-f179.google.com ([209.85.220.179]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cR464-0002Y8-W2 for linux-arm-kernel@lists.infradead.org; Tue, 10 Jan 2017 21:36:52 +0000 Received: by mail-qk0-f179.google.com with SMTP id a20so190083919qkc.1 for ; Tue, 10 Jan 2017 13:36:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QyHHhrBe2gQ61UTLo8mIWc+BAHyyLCivIW2v90ikNr8=; b=ELxvqtJVTM/Iivi/jPmK2BGT6mBYODon/iAC3NFIshzd3JWZTXvro6zOe7hxtTdOQi vkYZjKmjg1YNNxdUUwGMhl/1Nle1uNyajMlN8IDh7hbWo++MeMCSkJOdAZktfLe88aj/ wpLFCA62805eKnrzcXXifmisMYoBSknEjTe8x3rvs6ZTX4biGj93xpu/u20LFgPn1hlA x+Je2XAjdKHy0dh2CT1BSTS7BRMqxh1ICh265IjfPSL1du4iV8wgQz/Dd2EJp1dJd7kw TjM3vrN12+Oh7cXc20OFI65siIYhcfUfQeb+GN5W9ZTHIdBbk+OArpitfIr0wky8iT4F N9dg== X-Gm-Message-State: AIkVDXJYaW0A0dpb6xONxYIGstMuklEFebtai0ZY52+wZnlz2wKBLnkc/OaacwCwk3ngd/Zr X-Received: by 10.55.16.219 with SMTP id 88mr4711682qkq.29.1484084187375; Tue, 10 Jan 2017 13:36:27 -0800 (PST) Received: from labbott-redhat-machine.redhat.com ([2601:602:9802:a8dc::6b06]) by smtp.gmail.com with ESMTPSA id n188sm2406857qkc.30.2017.01.10.13.36.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 13:36:26 -0800 (PST) From: Laura Abbott To: Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas , Florian Fainelli 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> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484084150-1523-1-git-send-email-labbott@redhat.com> References: <1484084150-1523-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170110_133649_212422_94658918 X-CRM114-Status: GOOD ( 10.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 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. 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 *