From b786cdd56a403fb8410fa8bb3d1d96191a99b697 Mon Sep 17 00:00:00 2001 From: Jacky Bai <ping.bai@nxp.com> Date: Wed, 1 Sep 2021 18:14:13 +0800 Subject: [PATCH] LF-4521-01 clk: imx: Fix section mismatch build warning due to __init Fix below section mismatch build warning in imx8mm/mn/mq clock driver: WARNING: modpost: vmlinux.o(.text+0x667618): Section mismatch in reference from the function imx8mm_clocks_probe() to the function .init.text:imx_clk_init_on.isra.0() The function imx8mm_clocks_probe() references the function __init imx_clk_init_on.isra.0(). This is often because imx8mm_clocks_probe lacks a __init annotation or the annotation of imx_clk_init_on.isra.0 is wrong. WARNING: modpost: vmlinux.o(.text+0x66a034): Section mismatch in reference from the function imx8mn_clocks_probe() to the function .init.text:imx_clk_init_on.isra.0() The function imx8mn_clocks_probe() references the function __init imx_clk_init_on.isra.0(). This is often because imx8mn_clocks_probe lacks a __init annotation or the annotation of imx_clk_init_on.isra.0 is wrong. WARNING: modpost: vmlinux.o(.text+0x6713f8): Section mismatch in reference from the function imx8mq_clocks_probe() to the function .init.text:imx_clk_init_on.isra.0() The function imx8mq_clocks_probe() references the function __init imx_clk_init_on.isra.0(). This is often because imx8mq_clocks_probe lacks a __init annotation or the annotation of imx_clk_init_on.isra.0 is wrong. Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com> --- drivers/clk/imx/clk-imx8mm.c | 2 +- drivers/clk/imx/clk-imx8mn.c | 2 +- drivers/clk/imx/clk-imx8mq.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index 02bfc96b04a963..d6f4392039ca70 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -294,7 +294,7 @@ static const char *imx8mm_clko2_sels[] = {"osc_24m", "sys_pll2_200m", "sys_pll1_ static struct clk_hw_onecell_data *clk_hw_data; static struct clk_hw **hws; -static int __init imx_clk_init_on(struct device_node *np, +static int imx_clk_init_on(struct device_node *np, struct clk_hw * const clks[]) { u32 *array; diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index 7cd54eabd7a9bf..e131fb1a731501 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -286,7 +286,7 @@ static const char * const imx8mn_clko2_sels[] = {"osc_24m", "sys_pll2_200m", "sy static struct clk_hw_onecell_data *clk_hw_data; static struct clk_hw **hws; -static int __init imx_clk_init_on(struct device_node *np, +static int imx_clk_init_on(struct device_node *np, struct clk_hw * const clks[]) { u32 *array; diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c index 73cc228cac336e..2759a2767be7e7 100644 --- a/drivers/clk/imx/clk-imx8mq.c +++ b/drivers/clk/imx/clk-imx8mq.c @@ -276,7 +276,7 @@ static const char * const imx8mq_clko2_sels[] = {"osc_25m", "sys2_pll_200m", "sy static struct clk_hw_onecell_data *clk_hw_data; static struct clk_hw **hws; -static int __init imx_clk_init_on(struct device_node *np, +static int imx_clk_init_on(struct device_node *np, struct clk_hw * const clks[]) { u32 *array; -- GitLab