All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: integrator: fix section mismatch warning
@ 2017-09-15 19:42 Arnd Bergmann
  2017-09-18  7:39 ` [tip:timers/urgent] clocksource/integrator: Fix " tip-bot for Arnd Bergmann
  2017-09-21 11:42 ` [PATCH] clocksource: integrator: fix " Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-09-15 19:42 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: Arnd Bergmann, Thierry Reding, Linus Walleij, linux-kernel

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@arndb.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [tip:timers/urgent] clocksource/integrator: Fix section mismatch warning
  2017-09-15 19:42 [PATCH] clocksource: integrator: fix section mismatch warning Arnd Bergmann
@ 2017-09-18  7:39 ` tip-bot for Arnd Bergmann
  2017-09-21 11:42 ` [PATCH] clocksource: integrator: fix " Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Arnd Bergmann @ 2017-09-18  7:39 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: daniel.lezcano, linux-kernel, tglx, treding, arnd, hpa,
	linus.walleij, mingo

Commit-ID:  8fce3dc5c5d6f6301f67311fa79f333902b58cea
Gitweb:     http://git.kernel.org/tip/8fce3dc5c5d6f6301f67311fa79f333902b58cea
Author:     Arnd Bergmann <arnd@arndb.de>
AuthorDate: Fri, 15 Sep 2017 21:42:59 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 18 Sep 2017 09:37:33 +0200

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.

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

---
 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 2ff64d9..62d2469 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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clocksource: integrator: fix section mismatch warning
  2017-09-15 19:42 [PATCH] clocksource: integrator: fix section mismatch warning Arnd Bergmann
  2017-09-18  7:39 ` [tip:timers/urgent] clocksource/integrator: Fix " tip-bot for Arnd Bergmann
@ 2017-09-21 11:42 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2017-09-21 11:42 UTC (permalink / raw)
  To: Arnd Bergmann, Daniel Lezcano
  Cc: Thomas Gleixner, Thierry Reding, linux-kernel

On Fri, Sep 15, 2017 at 9:42 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> 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@arndb.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

I guess Daniel will pick this up.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-21 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 19:42 [PATCH] clocksource: integrator: fix section mismatch warning Arnd Bergmann
2017-09-18  7:39 ` [tip:timers/urgent] clocksource/integrator: Fix " tip-bot for Arnd Bergmann
2017-09-21 11:42 ` [PATCH] clocksource: integrator: fix " Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.