[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230503-virt-to-pfn-v6-4-rc1-v1-3-6c4698dcf9c8@linaro.org>
Date: Thu, 11 May 2023 13:59:20 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>,
Vineet Gupta <vgupta@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Russell King <linux@...linux.org.uk>,
Greg Ungerer <gerg@...ux-m68k.org>
Cc: linux-kernel@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-snps-arc@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
linux-arm-kernel@...ts.infradead.org, linux-arch@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH 03/12] ARC: init: Pass a pointer to virt_to_pfn() in init
Functions that work on a pointer to virtual memory such as
virt_to_pfn() and users of that function such as
virt_to_page() are supposed to pass a pointer to virtual
memory, ideally a (void *) or other pointer. However since
many architectures implement virt_to_pfn() as a macro,
this function becomes polymorphic and accepts both a
(unsigned long) and a (void *).
Fix up the offending call in arch/arc with an explicit cast.
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
arch/arc/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
index 2b89b6c53801..9f64d729c9f8 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -87,7 +87,7 @@ void __init setup_arch_memory(void)
setup_initial_init_mm(_text, _etext, _edata, _end);
/* first page of system - kernel .vector starts here */
- min_low_pfn = virt_to_pfn(CONFIG_LINUX_RAM_BASE);
+ min_low_pfn = virt_to_pfn((void *)CONFIG_LINUX_RAM_BASE);
/* Last usable page of low mem */
max_low_pfn = max_pfn = PFN_DOWN(low_mem_start + low_mem_sz);
--
2.34.1
Powered by blists - more mailing lists