clk: socfpga: Fix section mismatch warning
Subsystems (2)
PATCH 1/1 clk: socfpga: Fix section mismatch warning
From: Dinh Nguyen <[email protected]>
WARNING: drivers/clk/socfpga/built-in.o(.data+0xc0): Section mismatch in reference from the variable socfpga_child_clocks to the function .init.text:socfpga_pll_init()
The variable socfpga_child_clocks references
the function __init socfpga_pll_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: drivers/clk/socfpga/built-in.o(.data+0x184): Section mismatch in reference from the variable socfpga_child_clocks to the function .init.text:socfpga_periph_init()
The variable socfpga_child_clocks references
the function __init socfpga_periph_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
WARNING: drivers/clk/socfpga/built-in.o(.data+0x248): Section mismatch in reference from the variable socfpga_child_clocks to the function .init.text:socfpga_gate_init()
The variable socfpga_child_clocks references
the function __init socfpga_gate_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
--- drivers/clk/socfpga/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/socfpga/clk.c +1 -1
@@ -28,7 +28,7 @@void __iomem *clk_mgr_base_addr; -static struct of_device_id socfpga_child_clocks[] = { +static const struct of_device_id socfpga_child_clocks[]__initconst = { { .compatible ="altr,socfpga-pll-clock" , socfpga_pll_init, }, { .compatible ="altr,socfpga-perip-clk" , socfpga_periph_init, }, { .compatible ="altr,socfpga-gate-clk" , socfpga_gate_init, },
Signature · 1 line
1.7.9.5
PATCH 1/1 clk: socfpga: Fix section mismatch warning
Quoting dinguyen at altera.com (2014-03-13 14:08:01)
Quoted 29 lines
From: Dinh Nguyen <[email protected]>
WARNING: drivers/clk/socfpga/built-in.o(.data+0xc0): Section mismatch in reference from the variable
socfpga_child_clocksto the function .init.text:socfpga_pll_init()
The variablesocfpga_child_clocksreferences
the function__initsocfpga_pll_init()
If the reference is valid then annotate the
variable with __init* or__refdata(seelinux/init.h) or name the variable:*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_consoleWARNING: drivers/clk/socfpga/built-in.o(.data+0x184): Section mismatch in reference from the variable
socfpga_child_clocksto the function .init.text:socfpga_periph_init()
The variablesocfpga_child_clocksreferences
the function__initsocfpga_periph_init()
If the reference is valid then annotate the
variable with __init* or__refdata(seelinux/init.h) or name the variable:*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_consoleWARNING: drivers/clk/socfpga/built-in.o(.data+0x248): Section mismatch in reference from the variable
socfpga_child_clocksto the function .init.text:socfpga_gate_init()
The variablesocfpga_child_clocksreferences
the function__initsocfpga_gate_init()
If the reference is valid then annotate the
variable with __init* or__refdata(seelinux/init.h) or name the variable:*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_console
Quoted 2 lines
Reported-by Mike Turquette <[email protected]>Signed-off-by Dinh Nguyen <[email protected]>
Thanks! Taken into clk-next.
Regards,
Mike
Quoted 20 lines
--- drivers/clk/socfpga/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/socfpga/clk.c +1
-1@@ -28,7 +28,7 @@void __iomem *clk_mgr_base_addr; -static struct of_device_id socfpga_child_clocks[] = { +static const struct of_device_id socfpga_child_clocks[]__initconst = { { .compatible ="altr,socfpga-pll-clock" , socfpga_pll_init, }, { .compatible ="altr,socfpga-perip-clk" , socfpga_periph_init, }, { .compatible ="altr,socfpga-gate-clk" , socfpga_gate_init, },Signature · 1 line
1.7.9.5