Thread (3 messages) 3 messages, 3 authors, 2024-09-01

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

From: Peng Fan <peng.fan@nxp.com>
Date: 2024-08-23 09:23:22
Also in: imx, linux-patches, llvm

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@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help