From patchwork Tue Jan 3 17:21:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9495259 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 A9761606A7 for ; Tue, 3 Jan 2017 17:24:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF91C27BFF for ; Tue, 3 Jan 2017 17:24:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1F1027C2D; Tue, 3 Jan 2017 17:24:38 +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 62FA527BFF for ; Tue, 3 Jan 2017 17:24:38 +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 1cOSnv-0004Yw-Je; Tue, 03 Jan 2017 17:23:19 +0000 Received: from mail-qk0-f179.google.com ([209.85.220.179]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cOSnF-0004F2-64 for linux-arm-kernel@lists.infradead.org; Tue, 03 Jan 2017 17:22:38 +0000 Received: by mail-qk0-f179.google.com with SMTP id u25so370886094qki.2 for ; Tue, 03 Jan 2017 09:22:15 -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=LFSmMJZ0uDL1syiUsX479v6kyLUn3ZrafIEwgHfhepzg5+2oOwjFWiHd37637t+q+Q 47X6TDNYtOThA7qhh3PXyiDWfeNRjkgUebGblBVQzfrju0nyX/xCT7Ry/F8e2xQrBcj/ dx3FOtBPdVoE18vrb5zbbqlGZ6vJMs3P/rdV81+gVj2MFnTdSEGw5GxGvSXe9vNfllAk QHM0iaJzMUx4ywgBTThIwVxzilOWxnF4iSeNRun0JbiLuHDN+oK9IHXCcJuoY8laXC1D gAm2m1FpwVHNz9/dqZKE1pY3lShcgMn8tovW6VGEYUpeAgIuDgaYNgGKVCLzbh/T8Ohn zL5w== X-Gm-Message-State: AIkVDXIVZ3t8PYo7/NPHsFMs0txw3NtPw4h7oNF8YKXsILNX824TbBfa6k1GrVG1BbFN+wuP X-Received: by 10.55.11.130 with SMTP id 124mr61656710qkl.112.1483464135072; Tue, 03 Jan 2017 09:22:15 -0800 (PST) Received: from labbott-redhat-machine.redhat.com ([2601:602:9802:a8dc::6b06]) by smtp.gmail.com with ESMTPSA id 53sm44034313qtm.5.2017.01.03.09.22.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jan 2017 09:22:14 -0800 (PST) From: Laura Abbott To: Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas Subject: [PATCHv6 04/11] arm64: Add cast for virt_to_pfn Date: Tue, 3 Jan 2017 09:21:46 -0800 Message-Id: <1483464113-1587-5-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483464113-1587-1-git-send-email-labbott@redhat.com> References: <1483464113-1587-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170103_092237_409294_FDD40FAC X-CRM114-Status: GOOD ( 10.37 ) 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. 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 *