[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170915194310.1170514-1-arnd@arndb.de>
Date: Fri, 15 Sep 2017 21:42:59 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Daniel Lezcano <daniel.lezcano@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Arnd Bergmann <arnd@...db.de>, Thierry Reding <treding@...dia.com>,
Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] clocksource: integrator: fix section mismatch warning
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.
This adds the missing __init annotation that makes it build
cleanly with all compilers.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/clocksource/timer-integrator-ap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/timer-integrator-ap.c b/drivers/clocksource/timer-integrator-ap.c
index 2ff64d9d4fb3..62d24690ba02 100644
--- a/drivers/clocksource/timer-integrator-ap.c
+++ b/drivers/clocksource/timer-integrator-ap.c
@@ -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;
--
2.9.0
Powered by blists - more mailing lists