[PATCH] clocksource/drivers/timer-of: mark timer_of_exit as __init
From: Arnd Bergmann
Date: Mon Nov 06 2017 - 08:35:04 EST
The newly added function triggers a harmless Kbuild warning because
of a missing annotation:
WARNING: vmlinux.o(.text+0x448098): Section mismatch in reference from the function timer_of_exit() to the function .init.text:timer_clk_exit()
The function timer_of_exit() references
the function __init timer_clk_exit().
This is often because timer_of_exit lacks a __init
annotation or the annotation of timer_clk_exit is wrong.
The function is only called from other __init functions, so it
can safely be marked as __init as well.
Fixes: f48729a999ee ("clocksource/drivers/timer-of: Add timer_of_exit function")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/clocksource/timer-of.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 7c64a5c1bfc1..e301fdb1286e 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -177,7 +177,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to)
return ret;
}
-void timer_of_exit(struct timer_of *to)
+void __init timer_of_exit(struct timer_of *to)
{
if (to->flags & TIMER_OF_IRQ)
timer_irq_exit(&to->of_irq);
--
2.9.0