Skip to content

Commit c809202

Browse files
committed
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@linaro.org>
1 parent 8f24608 commit c809202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arc/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void __init setup_arch_memory(void)
8787
setup_initial_init_mm(_text, _etext, _edata, _end);
8888

8989
/* first page of system - kernel .vector starts here */
90-
min_low_pfn = virt_to_pfn(CONFIG_LINUX_RAM_BASE);
90+
min_low_pfn = virt_to_pfn((void *)CONFIG_LINUX_RAM_BASE);
9191

9292
/* Last usable page of low mem */
9393
max_low_pfn = max_pfn = PFN_DOWN(low_mem_start + low_mem_sz);

0 commit comments

Comments
 (0)