Skip to content

Commit

Permalink
clocksource/integrator: Fix section mismatch warning
Browse files Browse the repository at this point in the history
gcc-4.6 and older fail to inline integrator_clocksource_init, so they
end up showing a harmless warning:

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

Add the missing __init annotation that makes it build cleanly with all
compilers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: http://lkml.kernel.org/r/20170915194310.1170514-1-arnd@arndb.de
  • Loading branch information
Arnd Bergmann authored and Thomas Gleixner committed Sep 18, 2017
1 parent 0666f56 commit 8fce3dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clocksource/timer-integrator-ap.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ static u64 notrace integrator_read_sched_clock(void)
return -readl(sched_clk_base + TIMER_VALUE);
}

static int integrator_clocksource_init(unsigned long inrate,
void __iomem *base)
static int __init integrator_clocksource_init(unsigned long inrate,
void __iomem *base)
{
u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC;
unsigned long rate = inrate;
Expand Down

0 comments on commit 8fce3dc

Please sign in to comment.