ARM: OMAP: Get rid of section mismatch warnings
PATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
Get rid of the following and 8 other similar section mismatch warnings
WARNING: vmlinux.o(.text+0x2740c): Section mismatch in reference from the function zoom_lcd_panel_init() to the (unknown reference) .init.data:(unknown) The function zoom_lcd_panel_init() references
the (unknown reference) __initdata (unknown).
This is often because zoom_lcd_panel_init lacks a __initdata
annotation or the annotation of (unknown) is wrong.
WARNING: vmlinux.o(.text+0x277fc): Section mismatch in reference from the function omap_ethernet_init() to the (unknown reference) .init.data:(unknown) The function omap_ethernet_init() references
the (unknown reference) __initdata (unknown).
This is often because omap_ethernet_init lacks a __initdata
annotation or the annotation of (unknown) is wrong.
WARNING: vmlinux.o(.data+0x2ff3c): Section mismatch in reference from the variable serial1_data to the (unknown reference) .init.data:(unknown) The variable serial1_data references
the (unknown reference) __initdata (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
--- arch/arm/mach-omap2/board-3430sdp.c | 6 +++--- arch/arm/mach-omap2/board-4430sdp.c | 8 ++++---- arch/arm/mach-omap2/board-omap4panda.c | 6 +++--- arch/arm/mach-omap2/board-zoom-display.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +3 -3
@@ -622,19 +622,19 @@ static struct omap_device_pad serial3_pads[] __initdata = { OMAP_MUX_MODE0), }; -static struct omap_board_data serial1_data = { +static struct omap_board_data serial1_data__initdata = { .id =0 , .pads = serial1_pads, .pads_cnt =ARRAY_SIZE (serial1_pads), }; -static struct omap_board_data serial2_data = { +static struct omap_board_data serial2_data__initdata = { .id =1 , .pads = serial2_pads, .pads_cnt =ARRAY_SIZE (serial2_pads), }; -static struct omap_board_data serial3_data = { +static struct omap_board_data serial3_data__initdata = { .id =2 , .pads = serial3_pads, .pads_cnt =ARRAY_SIZE (serial3_pads),
arch/arm/mach-omap2/board-4430sdp.c +4 -4
@@ -258,7 +258,7 @@ static struct gpio sdp4430_eth_gpios[] __initdata = { { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" }, }; -static int omap_ethernet_init (void ) +static int __init omap_ethernet_init (void ) {int status;
@@ -672,19 +672,19 @@ static struct omap_device_pad serial4_pads[] __initdata = { OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), }; -static struct omap_board_data serial2_data = { +static struct omap_board_data serial2_data__initdata = { .id =1 , .pads = serial2_pads, .pads_cnt =ARRAY_SIZE (serial2_pads), }; -static struct omap_board_data serial3_data = { +static struct omap_board_data serial3_data__initdata = { .id =2 , .pads = serial3_pads, .pads_cnt =ARRAY_SIZE (serial3_pads), }; -static struct omap_board_data serial4_data = { +static struct omap_board_data serial4_data__initdata = { .id =3 , .pads = serial4_pads, .pads_cnt =ARRAY_SIZE (serial4_pads),
arch/arm/mach-omap2/board-omap4panda.c +3 -3
@@ -526,19 +526,19 @@ static struct omap_device_pad serial4_pads[] __initdata = { OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), }; -static struct omap_board_data serial2_data = { +static struct omap_board_data serial2_data__initdata = { .id =1 , .pads = serial2_pads, .pads_cnt =ARRAY_SIZE (serial2_pads), }; -static struct omap_board_data serial3_data = { +static struct omap_board_data serial3_data__initdata = { .id =2 , .pads = serial3_pads, .pads_cnt =ARRAY_SIZE (serial3_pads), }; -static struct omap_board_data serial4_data = { +static struct omap_board_data serial4_data__initdata = { .id =3 , .pads = serial4_pads, .pads_cnt =ARRAY_SIZE (serial4_pads),
arch/arm/mach-omap2/board-zoom-display.c +1 -1
@@ -26,7 +26,7 @@ static struct gpio zoom_lcd_gpios[] __initdata = { { LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" }, }; -static void zoom_lcd_panel_init (void ) +static void __init zoom_lcd_panel_init (void ) { zoom_lcd_gpios[0 ].gpio = (omap_rev () >OMAP3430_REV_ES3_0 ) ? LCD_PANEL_RESET_GPIO_PROD :
Signature · 1 line
1.7.1
PATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
Quoted 3 lines · Silesh C V
Get rid of the following and 8 other similar section mismatch warnings
I send this [1] patch a month back. It's still not considered though even after reminder.
Regards
Santosh
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
Quoted 8 lines · Santosh Shilimkar
Quoted 3 lines · Silesh C V
Get rid of the following and 8 other similar section mismatch warnings
I send this [1] patch a month back. It's still not considered though even after reminder.
Applying now into devel-fixes with additional fixes from Silesh. Updated patch below.
Regards,
Tony
From: Santosh Shilimkar <[email protected]>
Date: Mon, 4 Apr 2011 10:02:05 +0000
Subject: [PATCH] OMAP2+: Fix 9 section mismatch(es) warnings from mach-omap2/built-in.o
The serial*_data should have been marked as __initdata as per it's usage in the board files. Fix the same to remove the section mismatch warnings caused by it.
arch/arm/mach-omap2/board-3430sdp.c +3 -3
@@ -622,19 +622,19 @@ static struct omap_device_pad serial3_pads[] __initdata = { OMAP_MUX_MODE0), }; -static struct omap_board_data serial1_data = { +static struct omap_board_data serial1_data__initdata = { .id =0 , .pads = serial1_pads, .pads_cnt =ARRAY_SIZE (serial1_pads), }; -static struct omap_board_data serial2_data = { +static struct omap_board_data serial2_data__initdata = { .id =1 , .pads = serial2_pads, .pads_cnt =ARRAY_SIZE (serial2_pads), }; -static struct omap_board_data serial3_data = { +static struct omap_board_data serial3_data__initdata = { .id =2 , .pads = serial3_pads, .pads_cnt =ARRAY_SIZE (serial3_pads),
arch/arm/mach-omap2/board-4430sdp.c +4 -4
@@ -258,7 +258,7 @@ static struct gpio sdp4430_eth_gpios[] __initdata = { { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" }, }; -static int omap_ethernet_init (void ) +static int __init omap_ethernet_init (void ) {int status;
@@ -672,19 +672,19 @@ static struct omap_device_pad serial4_pads[] __initdata = { OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), }; -static struct omap_board_data serial2_data = { +static struct omap_board_data serial2_data__initdata = { .id =1 , .pads = serial2_pads, .pads_cnt =ARRAY_SIZE (serial2_pads), }; -static struct omap_board_data serial3_data = { +static struct omap_board_data serial3_data__initdata = { .id =2 , .pads = serial3_pads, .pads_cnt =ARRAY_SIZE (serial3_pads), }; -static struct omap_board_data serial4_data = { +static struct omap_board_data serial4_data__initdata = { .id =3 , .pads = serial4_pads, .pads_cnt =ARRAY_SIZE (serial4_pads),
arch/arm/mach-omap2/board-omap4panda.c +3 -3
@@ -526,19 +526,19 @@ static struct omap_device_pad serial4_pads[] __initdata = { OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), }; -static struct omap_board_data serial2_data = { +static struct omap_board_data serial2_data__initdata = { .id =1 , .pads = serial2_pads, .pads_cnt =ARRAY_SIZE (serial2_pads), }; -static struct omap_board_data serial3_data = { +static struct omap_board_data serial3_data__initdata = { .id =2 , .pads = serial3_pads, .pads_cnt =ARRAY_SIZE (serial3_pads), }; -static struct omap_board_data serial4_data = { +static struct omap_board_data serial4_data__initdata = { .id =3 , .pads = serial4_pads, .pads_cnt =ARRAY_SIZE (serial4_pads),
arch/arm/mach-omap2/board-zoom-display.c +1 -1
@@ -26,7 +26,7 @@ static struct gpio zoom_lcd_gpios[] __initdata = { { LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" }, }; -static void zoom_lcd_panel_init (void ) +static void __init zoom_lcd_panel_init (void ) { zoom_lcd_gpios[0 ].gpio = (omap_rev () >OMAP3430_REV_ES3_0 ) ? LCD_PANEL_RESET_GPIO_PROD :
PATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
Quoted 5 lines · Tony Lindgren
Quoted 4 lines · Santosh Shilimkar
Quoted 3 lines · Silesh C V
Get rid of the following and 8 other similar section mismatch warnings
Quoted 7 lines
Quoted 4 lines
I send this [1] patch a month back. It's still not considered though even after reminder.
Applying now into devel-fixes with additional fixes from Silesh. Updated patch below.
I also have this from a while back. There's also some nastyness in twl4030-power.c which requires basically s/__init/__devinit/ to almost the entire file.
8<--------
From: Russell King <[email protected]>
Fix various section mismatch warnings:
WARNING: arch/arm/plat-omap/built-in.o(.devinit.text+0x46c): Section mismatch in reference from the function omap_gpio_probe() to the function .init.text:omap_gpio_chip_init() The function __devinit omap_gpio_probe() references
a function __init omap_gpio_chip_init().
If omap_gpio_chip_init is only used by omap_gpio_probe then
annotate omap_gpio_chip_init with a matching annotation.
WARNING: arch/arm/mach-omap2/built-in.o(.text+0x423c): Section mismatch in reference from the function pm_dbg_regset_init() to the function .init.text:pm_dbg_init() The function pm_dbg_regset_init() references
the function __init pm_dbg_init().
This is often because pm_dbg_regset_init lacks a __init
annotation or the annotation of pm_dbg_init is wrong.
--
arch/arm/mach-omap2/pm-debug.c | 4 ++-- arch/arm/plat-omap/gpio.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/gpio.c +1 -1
@@ -1629,7 +1629,7 @@ static void omap_gpio_mod_init(struct gpio_bank *bank, int id) } } -static void __init omap_gpio_chip_init (struct gpio_bank *bank) +static void __devinit omap_gpio_chip_init (struct gpio_bank *bank) {int j;static int gpio;
arch/arm/mach-omap2/pm-debug.c +2 -2
@@ -189,7 +189,7 @@ static struct dentry *pm_dbg_dir;static int pm_dbg_init_done; -static int __init pm_dbg_init (void ); +static int pm_dbg_init (void );enum {DEBUG_FILE_COUNTERS =0 ,
@@ -595,7 +595,7 @@ static int option_set(void *data, u64 val)DEFINE_SIMPLE_ATTRIBUTE (pm_dbg_option_fops, option_get, option_set,"%llu\n" ); -static int __init pm_dbg_init (void ) +static int pm_dbg_init (void ) {int i;struct dentry *d;
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
Quoted 9 lines · Russell King - ARM Linux
Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Santosh Shilimkar
Quoted 3 lines · Silesh C V
Get rid of the following and 8 other similar section mismatch warnings
I send this [1] patch a month back. It's still not considered though even after reminder.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Applying now into devel-fixes with additional fixes from Silesh. Updated patch below.
I also have this from a while back. There's also some nastyness in
twl4030-power.cwhich requires basically s/__init/__devinit/ to almost the entire file.
OK thanks. Kevin, can you queue this fix? Assuming the move of omap gpio to drivers/gpio happens this merge window, this needs to be updated for the path.
Regards,
Tony
Quoted 59 lines
8<--------
From: Russell King <[email protected]>Fix various section mismatch warnings:
WARNING: arch/arm/plat-omap/built-in.o(.devinit.text+0x46c): Section mismatch in reference from the function
omap_gpio_probe()to the function .init.text:omap_gpio_chip_init() The function__devinitomap_gpio_probe()references
a function__initomap_gpio_chip_init().
Ifomap_gpio_chip_initis only used byomap_gpio_probethen
annotateomap_gpio_chip_initwith a matching annotation.WARNING: arch/arm/mach-omap2/built-in.o(.text+0x423c): Section mismatch in reference from the function
pm_dbg_regset_init()to the function .init.text:pm_dbg_init() The functionpm_dbg_regset_init()references
the function__initpm_dbg_init().
This is often becausepm_dbg_regset_initlacks a__init
annotation or the annotation ofpm_dbg_initis wrong.Signed-off-by Russell King <[email protected]>--
arch/arm/mach-omap2/pm-debug.c | 4 ++-- arch/arm/plat-omap/gpio.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)arch/arm/plat-omap/gpio.c +1
-1@@ -1629,7 +1629,7 @@ static void omap_gpio_mod_init(struct gpio_bank *bank, int id) } } -static void __init omap_gpio_chip_init (struct gpio_bank *bank) +static void __devinit omap_gpio_chip_init (struct gpio_bank *bank) {int j;static int gpio;arch/arm/mach-omap2/pm-debug.c +2
-2@@ -189,7 +189,7 @@ static struct dentry *pm_dbg_dir;static int pm_dbg_init_done; -static int __init pm_dbg_init (void ); +static int pm_dbg_init (void );enum {DEBUG_FILE_COUNTERS =0 ,@@ -595,7 +595,7 @@ static int option_set(void *data, u64 val)DEFINE_SIMPLE_ATTRIBUTE (pm_dbg_option_fops, option_get, option_set,"%llu\n" ); -static int __init pm_dbg_init (void ) +static int pm_dbg_init (void ) {int i;struct dentry *d;
PATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
Quoted 15 lines · Tony Lindgren
Quoted 14 lines · Russell King - ARM Linux
Quoted 12 lines · Tony Lindgren
Quoted 8 lines · Santosh Shilimkar
Quoted 3 lines · Silesh C V
Get rid of the following and 8 other similar section mismatch warnings
I send this [1] patch a month back. It's still not considered though even after reminder.
Applying now into devel-fixes with additional fixes from Silesh. Updated patch below.
Quoted 7 lines
Quoted 3 lines
I also have this from a while back. There's also some nastyness in
twl4030-power.cwhich requires basically s/__init/__devinit/ to almost the entire file.OK thanks. Kevin, can you queue this fix? Assuming the move of omap gpio to
drivers/gpiohappens this merge window, this needs to be updated for the path.
Yeah, I'll take care of this.
GPIO move is now merged for 2.6.40, so I'll queue this as a fix for the first -rc cycle.
Kevin
PATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
In reply to Tony LindgrenQuoted 11 lines · Tony Lindgren
Quoted 8 lines · Santosh Shilimkar
Quoted 3 lines · Silesh C V
Get rid of the following and 8 other similar section mismatch warnings
I send this [1] patch a month back. It's still not considered though even after reminder.
Applying now into devel-fixes with additional fixes from Silesh. Updated patch below.
Can this [1] also be applied to the devel-fixes, please? It is a month old today...
[1] https://patchwork.kernel.org/patch/733531/
Thanks
Signature · 2 lines
Regards, Igor.
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP: Get rid of section mismatch warnings
Quoted 7 lines · Igor Grinberg
Quoted 5 lines · Tony Lindgren
Quoted 4 lines · Santosh Shilimkar
Quoted 3 lines · Silesh C V
Get rid of the following and 8 other similar section mismatch warnings
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
I send this [1] patch a month back. It's still not considered though even after reminder.
Applying now into devel-fixes with additional fixes from Silesh. Updated patch below.
Can this [1] also be applied to the devel-fixes, please? It is a month old today...
Applying thanks.
Regards,
Tony