[PATCH] ARM: mark prepare_page_table as __init

Linus Walleij linus.walleij at linaro.org
Mon May 17 03:21:59 PDT 2021


On Tue, May 11, 2021 at 11:04 AM Arnd Bergmann <arnd at kernel.org> wrote:

> From: Arnd Bergmann <arnd at arndb.de>
>
> In some configurations when building with gcc-11, prepare_page_table
> does not get inline, which causes a build time warning for a section
> mismatch:
>
> WARNING: modpost: vmlinux.o(.text.unlikely+0xce8): Section mismatch in reference from the function prepare_page_table() to the (unknown reference) .init.data:(unknown)
> The function prepare_page_table() references
> the (unknown reference) __initdata (unknown).
> This is often because prepare_page_table lacks a __initdata
> annotation or the annotation of (unknown) is wrong.
>
> Mark the function as __init to avoid the warning regardless of the
> inlining.
>
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>

Like the others say, drop inline, with that:
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list