Skip to contentSkip to conversation

ARM: dove: Declare symbol __init to avoid section mismatch

PATCH New Ezequiel Garcia 2 participants 2 messages Aug 23, 2013 – Aug 26, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dove: Declare symbol __init to avoid section mismatch

Declare dove_mpp_gpio_mode() symbol as __init, since it's only called from __init functions. This removes the following warning:

vmlinux.o(.text.unlikely+0x894): Section mismatch in reference from the function dove_mpp_gpio_mode() to the function .init.text:orion_gpio_set_valid()

---
 arch/arm/mach-dove/mpp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-dove/mpp.c +1 -1
index 60bd729..8a433a5 100644
@@ -47,7 +47,7 @@ static const struct dove_mpp_grp dove_mpp_grp[] = {
 
 /* Enable gpio for a range of pins. mode should be a combination of
    GPIO_OUTPUT_OK | GPIO_INPUT_OK */
-static void dove_mpp_gpio_mode(int start, int end, int gpio_mode)
+static void __init dove_mpp_gpio_mode(int start, int end, int gpio_mode)
 {
 	int i;
 
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/1 ARM: dove: Declare symbol __init to avoid section mismatch

Quoted 10 lines · Ezequiel Garcia

Declare dove_mpp_gpio_mode() symbol as __init, since it's only called from __init functions. This removes the following warning:

vmlinux.o(.text.unlikely+0x894): Section mismatch in reference from the function dove_mpp_gpio_mode() to the function .init.text:orion_gpio_set_valid()

---
 arch/arm/mach-dove/mpp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

doh! Sebastian beat you to it. :) In mvebu/fixes-non-critical:

2746a7c ARM: dove: fix missing __init section of dove_mpp_gpio_mode

thx,

Jason.