[3.4,019/146] C6x: time: Ensure consistency in __init

Message ID 1442307861-32031-19-git-send-email-lizf@kernel.org
State New
Headers show

Commit Message

Zefan Li Sept. 15, 2015, 9:02 a.m.
From: Nishanth Menon <nm@ti.com>

3.4.109-rc1 review patch.  If anyone has any objections, please let me know.


commit f4831605f2dacd12730fe73961c77253cc2ea425 upstream.

time_init invokes timer64_init (which is __init annotation)
since all of these are invoked at init time, lets maintain
consistency by ensuring time_init is marked appropriately
as well.

This fixes the following warning with CONFIG_DEBUG_SECTION_MISMATCH=y

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

Fixes: 546a39546c64 ("C6X: time management")
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
 arch/c6x/kernel/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/arch/c6x/kernel/time.c b/arch/c6x/kernel/time.c
index 356ee84..04845aa 100644
--- a/arch/c6x/kernel/time.c
+++ b/arch/c6x/kernel/time.c
@@ -49,7 +49,7 @@  u64 sched_clock(void)
 	return (tsc * sched_clock_multiplier) >> SCHED_CLOCK_SHIFT;
-void time_init(void)
+void __init time_init(void)
 	u64 tmp = (u64)NSEC_PER_SEC << SCHED_CLOCK_SHIFT;