Skip to content

Commit 1ec2362

Browse files
nathanchanceShawn Guo
authored andcommitted
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: llvm/llvm-project@6b11573 [1] Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent 9c26327 commit 1ec2362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/mach-imx/mach-imx7d.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static void __init imx7d_enet_clk_sel(void)
4848
}
4949
}
5050

51-
static inline void imx7d_enet_init(void)
51+
static void __init imx7d_enet_init(void)
5252
{
5353
imx7d_enet_phy_init();
5454
imx7d_enet_clk_sel();

0 commit comments

Comments
 (0)