[PATCH] ARM: imx: Annotate imx7d_enet_init() as __init

Peng Fan peng.fan at nxp.com
Fri Aug 23 02:20:20 PDT 2024


> Subject: [PATCH] ARM: imx: Annotate imx7d_enet_init() as __init
> 
> After a recent LLVM change [1] that deduces __cold on functions that
> only call cold code (such as __init functions), there is a section
> mismatch warning from imx7d_enet_init(), which got moved
> to .text.unlikely. as a result of that optimization:
> 
>   WARNING: modpost: vmlinux: section mismatch in reference:
> imx7d_enet_init+0x20 (section: .text.unlikely.) -> imx7d_enet_clk_sel
> (section: .init.text)
> 
> Drop the inline keyword (which does not guarantee inlining) and
> replace it with __init, as imx7d_enet_init() is only called from __init
> code, which clears up the warning.
> 
> Link:
> Signed-off-by: Nathan Chancellor <nathan at kernel.org>

Reviewed-by: Peng Fan <peng.fan at nxp.com>



More information about the linux-arm-kernel mailing list