linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omap: hwmod: fix section mismatch warnings
@ 2017-09-15 19:45 Arnd Bergmann
  2017-09-18 16:52 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-09-15 19:45 UTC (permalink / raw)
  To: linux-arm-kernel

Older compilers choose not to inline _setup_clkctrl_provider(),
leading to a harmless warning:

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

This annotates it as __init as well, which lets the linker
see that it is actually correct.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/omap_hwmod.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2dbd63239c54..91ec0ca4822b 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -732,7 +732,7 @@ static int _match_clkdm(struct clockdomain *clkdm, void *user)
 	return 0;
 }
 
-static int _setup_clkctrl_provider(struct device_node *np)
+static int __init _setup_clkctrl_provider(struct device_node *np)
 {
 	const __be32 *addrp;
 	struct clkctrl_provider *provider;
@@ -761,7 +761,7 @@ static int _setup_clkctrl_provider(struct device_node *np)
 	return 0;
 }
 
-static int _init_clkctrl_providers(void)
+static int __init _init_clkctrl_providers(void)
 {
 	struct device_node *np;
 	int ret = 0;
-- 
2.9.0

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

* [PATCH] omap: hwmod: fix section mismatch warnings
  2017-09-15 19:45 [PATCH] omap: hwmod: fix section mismatch warnings Arnd Bergmann
@ 2017-09-18 16:52 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2017-09-18 16:52 UTC (permalink / raw)
  To: linux-arm-kernel

* Arnd Bergmann <arnd@arndb.de> [170915 12:46]:
> Older compilers choose not to inline _setup_clkctrl_provider(),
> leading to a harmless warning:
> 
> WARNING: vmlinux.o(.text+0x27b34): Section mismatch in reference from the function _setup_clkctrl_provider() to the function .init.text:memblock_virt_alloc_try_nid()
> The function _setup_clkctrl_provider() references
> the function __init memblock_virt_alloc_try_nid().
> This is often because _setup_clkctrl_provider lacks a __init
> annotation or the annotation of memblock_virt_alloc_try_nid is wrong.
> 
> This annotates it as __init as well, which lets the linker
> see that it is actually correct.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Tony Lindgren <tony@atomide.com>

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

end of thread, other threads:[~2017-09-18 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-15 19:45 [PATCH] omap: hwmod: fix section mismatch warnings Arnd Bergmann
2017-09-18 16:52 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).