# \[PATCH v2 5/8\] clk: don't mark clkdev\_add\_table as init

- From: Russell King - ARM Linux \<hidden\>
- Date: 2012-10-12 09:15:54 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2012/10/3938525
- Thread: https://ratatoskr.run/linux-arm-kernel/2012/10/3936815/t.md

```text
On Tue, Oct 09, 2012 at 10:13:55PM +0200, Arnd Bergmann wrote:
> s3c2440_clk_add is a subsys_interface method and calls clkdev_add_table,
> which means we might be calling it after the __init section is
> discarded.
> 
> Without this patch, building mini2440_defconfig results in:
> 
> WARNING: vmlinux.o(.text+0x9848): Section mismatch in reference from the function s3c2440_clk_add() to the function .init.text:clkdev_add_table()
> The function s3c2440_clk_add() references
> the function __init clkdev_add_table().
> This is often because s3c2440_clk_add lacks a __init
> annotation or the annotation of clkdev_add_table is wrong.

I'm not sure this is the right thing to do.  I suspect this comes from the
stupidly complex samsung code, and that this is actually safe - I suspect
that s3c2440_clk_add() needs to be appropriately marked, but then you end
up having to trace its call path through various structures etc.
```
