Skip to content

Commit

Permalink
csky: Cast argument to virt_to_pfn() to (void *)
Browse files Browse the repository at this point in the history
The virt_to_pfn() function takes a (void *) as argument, fix
this up to avoid exploiting the unintended polymorphism of
virt_to_pfn.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
  • Loading branch information
Linus Walleij authored and Guo Ren committed Aug 11, 2023
1 parent 1362d15 commit ee12fe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ extern int pfn_valid(unsigned long pfn);

#else /* CONFIG_HIGHMEM */

#define ARCH_PFN_OFFSET virt_to_pfn(CONFIG_LINUX_RAM_BASE)
#define ARCH_PFN_OFFSET virt_to_pfn((void *)CONFIG_LINUX_RAM_BASE)

#endif /* CONFIG_HIGHMEM */

Expand Down

0 comments on commit ee12fe2

Please sign in to comment.