Skip to contentSkip to conversation

clk: mediatek: mark mtk_infrasys_init_early __init

PATCH Applied Arnd Bergmann 2 participants 2 messages Sep 15, 2017 – Nov 2, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: mediatek: mark mtk_infrasys_init_early __init

On gcc-4.6, we get a harmless link-time warning:

WARNING: vmlinux.o(.text.unlikely+0x196a0): Section mismatch in reference from the function mtk_infrasys_init_early() to the function .init.text:mtk_clk_register_cpumuxes() The function mtk_infrasys_init_early() references
the function __init mtk_clk_register_cpumuxes().
This is often because mtk_infrasys_init_early lacks a __init
annotation or the annotation of mtk_clk_register_cpumuxes is wrong.

Newer compilers inline this function so they don't warn, but marking it __init is the right solution for all versions.

Fixes e9862118272a ("clk: mediatek: Add MT2701 clock support")
---
 drivers/clk/mediatek/clk-mt2701.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/mediatek/clk-mt2701.c +1 -1
index 9598889f972b..8e7f16fd87c9 100644
@@ -750,7 +750,7 @@ static const struct mtk_fixed_factor infra_fixed_divs[] = {
 
 static struct clk_onecell_data *infra_clk_data;
 
-static void mtk_infrasys_init_early(struct device_node *node)
+static void __init mtk_infrasys_init_early(struct device_node *node)
 {
 	int r, i;
 
Signature · 1 line
2.9.0
Applied
#1 lore raw
Quoted 8 lines · Arnd Bergmann

On gcc-4.6, we get a harmless link-time warning:

WARNING: vmlinux.o(.text.unlikely+0x196a0): Section mismatch in reference from the function mtk_infrasys_init_early() to the function .init.text:mtk_clk_register_cpumuxes() The function mtk_infrasys_init_early() references
the function __init mtk_clk_register_cpumuxes().
This is often because mtk_infrasys_init_early lacks a __init
annotation or the annotation of mtk_clk_register_cpumuxes is wrong.

Quoted 6 lines

Newer compilers inline this function so they don't warn, but marking it __init is the right solution for all versions.

Fixes e9862118272a ("clk: mediatek: Add MT2701 clock support")

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project