linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: Fix section mismatch on sst25l
@ 2010-11-12 16:03 Fabio Estevam
  2010-11-26 15:55 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2010-11-12 16:03 UTC (permalink / raw)
  To: linux-mtd; +Cc: dwmw2

Building the kernel with 'make CONFIG_DEBUG_SECTION_MISMATCH=y´

resulted in:

WARNING: vmlinux.o(.data+0x15938): Section mismatch in reference from
the variable sst25l_driver to the function .init.text:sst25l_probe()
The variable sst25l_driver references
the function __init sst25l_probe()
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,

Fix the section mismatch.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/mtd/devices/sst25l.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 684247a..925b1a9 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -375,7 +375,7 @@ static struct flash_info *__init sst25l_match_device(struct spi_device *spi)
 	return flash_info;
 }
 
-static int __init sst25l_probe(struct spi_device *spi)
+static int __devinit sst25l_probe(struct spi_device *spi)
 {
 	struct flash_info *flash_info;
 	struct sst25l_flash *flash;
-- 
1.6.0.4




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

* Re: [PATCH] mtd: Fix section mismatch on sst25l
  2010-11-12 16:03 [PATCH] mtd: Fix section mismatch on sst25l Fabio Estevam
@ 2010-11-26 15:55 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2010-11-26 15:55 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: dwmw2, linux-mtd

On Fri, 2010-11-12 at 08:03 -0800, Fabio Estevam wrote:
> Building the kernel with 'make CONFIG_DEBUG_SECTION_MISMATCH=y´
> 
> resulted in:
> 
> WARNING: vmlinux.o(.data+0x15938): Section mismatch in reference from
> the variable sst25l_driver to the function .init.text:sst25l_probe()
> The variable sst25l_driver references
> the function __init sst25l_probe()
> 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,
> 
> Fix the section mismatch.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/mtd/devices/sst25l.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
> index 684247a..925b1a9 100644
> --- a/drivers/mtd/devices/sst25l.c
> +++ b/drivers/mtd/devices/sst25l.c
> @@ -375,7 +375,7 @@ static struct flash_info *__init sst25l_match_device(struct spi_device *spi)
>  	return flash_info;
>  }
>  
> -static int __init sst25l_probe(struct spi_device *spi)
> +static int __devinit sst25l_probe(struct spi_device *spi)
>  {
>  	struct flash_info *flash_info;
>  	struct sst25l_flash *flash;

Should then sst25l_match_device be __devinit as well?

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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

end of thread, other threads:[~2010-11-26 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12 16:03 [PATCH] mtd: Fix section mismatch on sst25l Fabio Estevam
2010-11-26 15:55 ` Artem Bityutskiy

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).