Skip to contentSkip to conversation

mtd: maps/sa1100: fix section mismatch

PATCH New Dmitry Artamonow 2 participants 2 messages Oct 9, 2009 – Oct 11, 2009 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: maps/sa1100: fix section mismatch

Commit f0b1e589 changed sa1100_mtd_probe from __init to __devinit, but missed to correct sa1100_setup_mtd definition accordingly, which causes following warning:

WARNING: vmlinux.o(.devinit.text+0xf4): Section mismatch in reference from
the function sa1100_mtd_probe() to the function .init.text:sa1100_setup_mtd()
The function __devinit sa1100_mtd_probe() references
a function __init sa1100_setup_mtd().
If sa1100_setup_mtd is only used by sa1100_mtd_probe then annotate sa1100_setup_mtd with a matching annotation.

---
 drivers/mtd/maps/sa1100-flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/maps/sa1100-flash.c +1 -1
index fdb97f3..b1cf17b 100644
@@ -248,7 +248,7 @@ static void sa1100_destroy(struct sa_info *info, struct flash_platform_data *pla
 		plat->exit();
 }
 
-static struct sa_info *__init
+static struct sa_info *__devinit
 sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
 {
 	struct sa_info *info;
Signature · 1 line
1.6.3.4
#1 lore raw

PATCH 1/1 mtd: maps/sa1100: fix section mismatch

Quoted 4 lines · Dmitry Artamonow

Commit f0b1e589 changed sa1100_mtd_probe from __init to __devinit, but missed to correct sa1100_setup_mtd definition accordingly, which causes following warning:

Quoted 8 lines

WARNING: vmlinux.o(.devinit.text+0xf4): Section mismatch in reference from
the function sa1100_mtd_probe() to the function .init.text:sa1100_setup_mtd()
The function __devinit sa1100_mtd_probe() references
a function __init sa1100_setup_mtd().
If sa1100_setup_mtd is only used by sa1100_mtd_probe then annotate sa1100_setup_mtd with a matching annotation.

Added to my l2-mtd-2.6.git tree:

http://git.infradead.org/users/dedekind/l2-mtd-2.6.git/commit/232216ec8d423a222ae113bd15691d66a1e6d957

Signature · 2 lines
Best Regards,
Artem Bityutskiy (????? ????????)