Skip to content

Commit

Permalink
ARM: omap: hwmod: fix section mismatch warnings
Browse files Browse the repository at this point in the history
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.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Jan 22, 2018
1 parent 3343647 commit 0ca14cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ static const struct of_device_id ti_clkctrl_match_table[] __initconst = {
{ }
};

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;
Expand Down Expand Up @@ -743,7 +743,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;
Expand Down

0 comments on commit 0ca14cd

Please sign in to comment.