diff mbox series

gpio: omap: omap_gpio_show_rev is not __init

Message ID 20170916204234.725130-1-arnd@arndb.de
State Accepted
Commit e4b2ae7a8a11c5d4e0a6e21ba65d4b487a15d3d8
Headers show
Series gpio: omap: omap_gpio_show_rev is not __init | expand

Commit Message

Arnd Bergmann Sept. 16, 2017, 8:42 p.m. UTC
The probe function calls omap_gpio_show_rev(), which on most
compilers is inlined, but on the old gcc-4.6 is not, causing
a valid warning about the incorrect __init annotation:

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

This removes the __init.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/gpio/gpio-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Linus Walleij Sept. 21, 2017, 12:02 p.m. UTC | #1
On Sat, Sep 16, 2017 at 10:42 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> The probe function calls omap_gpio_show_rev(), which on most

> compilers is inlined, but on the old gcc-4.6 is not, causing

> a valid warning about the incorrect __init annotation:

>

> WARNING: vmlinux.o(.text+0x40f614): Section mismatch in reference from the function omap_gpio_probe() to the function .init.text:omap_gpio_show_rev()

> The function omap_gpio_probe() references

> the function __init omap_gpio_show_rev().

> This is often because omap_gpio_probe lacks a __init

> annotation or the annotation of omap_gpio_show_rev is wrong.

>

> This removes the __init.

>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Patch applied for fixes.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index dbf869fb63ce..22d7d4838265 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1010,7 +1010,7 @@  static void omap_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
 
 /*---------------------------------------------------------------------*/
 
-static void __init omap_gpio_show_rev(struct gpio_bank *bank)
+static void omap_gpio_show_rev(struct gpio_bank *bank)
 {
 	static bool called;
 	u32 rev;