]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ARM: imx: Annotate imx7d_enet_init() as __init
authorNathan Chancellor <nathan@kernel.org>
Fri, 23 Aug 2024 00:05:17 +0000 (17:05 -0700)
committerShawn Guo <shawnguo@kernel.org>
Sun, 1 Sep 2024 07:36:35 +0000 (15:36 +0800)
commit1ec2362084a013df4d78cbfd3228e8c254a67cac
treecef221007a60af8ff475538cd9f75ad07704bcad
parent9c26327ee71af934b924ac374681518f60f226e7
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: https://github.com/llvm/llvm-project/commit/6b11573b8c5e3d36beee099dbe7347c2a007bf53
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/mach-imx7d.c