From patchwork Tue Dec 6 23:50:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9463479 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 EF19F6022E for ; Tue, 6 Dec 2016 23:54:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0E3527D85 for ; Tue, 6 Dec 2016 23:54:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D49D5284D4; Tue, 6 Dec 2016 23:54:17 +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 AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8C7DD27D85 for ; Tue, 6 Dec 2016 23:54:17 +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 1cEPXW-0004o3-Nq; Tue, 06 Dec 2016 23:52:50 +0000 Received: from mail-qt0-f170.google.com ([209.85.216.170]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cEPWL-0003th-4z for linux-arm-kernel@lists.infradead.org; Tue, 06 Dec 2016 23:51:39 +0000 Received: by mail-qt0-f170.google.com with SMTP id c47so362890228qtc.2 for ; Tue, 06 Dec 2016 15:51:16 -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=6F/ifBiNBNdXIxXAD+PlTPffQEu1oc3f+gwZlwVpSfc=; b=JB/B9861Gv7Dm5PX9urnskaQpFYosvdIZFKFUmpQrLkUTCqecxxu+LsRa9pZSbnXbJ mvDZKY6jhHUAe1MtAQ62j+uqOi3uqEU7lYIaeHRT/Ynrj37VCruos+WQ41NhUCCL0qA9 uqFkPBDMqFs+751TROUZ12ob9cSuifTClE8xyz8aPawrbaw3fhV1Gf3o6NSm1QDzOya+ 8LV/z5eLrfAPAR0IjPvA+UXSMgQb2oZQD09qozj9DP9/a3BmXrijl2tk49zHa4+iO840 UkhKqckfQOpIOj/SG+mzsbG6j68/7djcDdNK9qfOA0iiQIUcG1UW/9vM0lQIFkEqiW3P sgWg== X-Gm-Message-State: AKaTC00433rnP+GnjFN0jKvYA8ky+Zz51XfWAgrhpSyV3AHrKVjp4ZNOSh7vxcRwT2etAsLt X-Received: by 10.200.43.167 with SMTP id m36mr56280654qtm.117.1481068275794; Tue, 06 Dec 2016 15:51:15 -0800 (PST) Received: from labbott-redhat-machine.redhat.com ([2601:602:9800:177f::df9b]) by smtp.gmail.com with ESMTPSA id o190sm2739212qke.5.2016.12.06.15.51.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Dec 2016 15:51:14 -0800 (PST) From: Laura Abbott To: Mark Rutland , Ard Biesheuvel , Will Deacon , Catalin Marinas Subject: [PATCHv5 04/11] arm64: Add cast for virt_to_pfn Date: Tue, 6 Dec 2016 15:50:50 -0800 Message-Id: <1481068257-6367-5-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481068257-6367-1-git-send-email-labbott@redhat.com> References: <1481068257-6367-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161206_155137_484327_8C7516F6 X-CRM114-Status: GOOD ( 10.85 ) 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 --- v5: No changes --- 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 *