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

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

From: Shawn Guo <hidden>
Date: 2024-09-01 07:38:22
Also in: imx, linux-patches, llvm

On Thu, Aug 22, 2024 at 05:05:17PM -0700, Nathan Chancellor wrote:
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 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Applied, thanks!

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help