[PATCH v3 12/12] m68k/mm: Make pfn accessors static inlines

Geert Uytterhoeven geert at linux-m68k.org
Wed May 24 03:13:47 PDT 2023


On Tue, May 23, 2023 at 4:05 PM Linus Walleij <linus.walleij at linaro.org> wrote:
> Making virt_to_pfn() a static inline taking a strongly typed
> (const void *) makes the contract of a passing a pointer of that
> type to the function explicit and exposes any misuse of the
> macro virt_to_pfn() acting polymorphic and accepting many types
> such as (void *), (unitptr_t) or (unsigned long) as arguments
> without warnings.
>
> For symmetry, do the same with pfn_to_virt().
>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>

Reviewed-by: Geert Uytterhoeven <geert at linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert at linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-snps-arc mailing list