m68k: Pass a pointer to virt_to_pfn() virt_to_page()
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 3 Jun 2022 08:40:24 +0000 (10:40 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 29 May 2023 09:27:07 +0000 (11:27 +0200)
commit8f246087724a2f902a5deb2013f73b7516b2276e
tree4eb5188277a74690bdeba1ce4a0cfce75caaa2c7
parent9b2d38b4e4a4651ac6efc8ca1a1882c0d4f12937
m68k: Pass a pointer to virt_to_pfn() virt_to_page()

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 calls in arch/m68k with explicit casts.

The page table include <asm/pgtable.h> will include different
variants of the defines depending on whether you build for
classic m68k, ColdFire or Sun3, so fix all variants.

Delete Coldfire pte_pagenr() which was using unsigned long
semantics from __pte_page().

Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/m68k/include/asm/mcf_pgtable.h
arch/m68k/include/asm/sun3_pgtable.h
arch/m68k/mm/mcfmmu.c
arch/m68k/mm/motorola.c
arch/m68k/mm/sun3mmu.c
arch/m68k/sun3/dvma.c
arch/m68k/sun3x/dvma.c