linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: rx51: Fix a section mismatch warn
@ 2012-09-12 14:37 Shubhrajyoti D
  2012-10-08 21:07 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Shubhrajyoti D @ 2012-09-12 14:37 UTC (permalink / raw)
  To: linux-arm-kernel

rx51_si4713_dev is referenced only from rx51_init_si4713.
So the memory for rx51_si4713_dev can be safely freed after init.
Also it references rx51_si4713_board_info which is __initdata_or_module.

fixes the below warning.

WARNING: vmlinux.o(.data+0x30958): Section mismatch in reference from the variable rx51_si4713_dev to the (unknown reference) .init.data:(unknown)
The variable rx51_si4713_dev 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

Reported-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index df2534d..e2e1148 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -743,7 +743,7 @@ static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module =
 	.subdev_board_info = &rx51_si4713_board_info,
 };
 
-static struct platform_device rx51_si4713_dev = {
+static struct platform_device rx51_si4713_dev __initdata_or_module = {
 	.name	= "radio-si4713",
 	.id	= -1,
 	.dev	= {
-- 
1.7.5.4

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

* [PATCH] ARM: OMAP: rx51: Fix a section mismatch warn
  2012-09-12 14:37 [PATCH] ARM: OMAP: rx51: Fix a section mismatch warn Shubhrajyoti D
@ 2012-10-08 21:07 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2012-10-08 21:07 UTC (permalink / raw)
  To: linux-arm-kernel

* Shubhrajyoti D <shubhrajyoti@ti.com> [120912 07:38]:
> rx51_si4713_dev is referenced only from rx51_init_si4713.
> So the memory for rx51_si4713_dev can be safely freed after init.
> Also it references rx51_si4713_board_info which is __initdata_or_module.

Thanks applying into fixes.

Tony

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

end of thread, other threads:[~2012-10-08 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 14:37 [PATCH] ARM: OMAP: rx51: Fix a section mismatch warn Shubhrajyoti D
2012-10-08 21:07 ` 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).