Skip to contentSkip to conversation

Fix section mismatch: ata_sff_exit

PATCH In review Luck, Tony 2 participants 2 messages Aug 23, 2010 – Aug 24, 2010

Subsystems (2)
lore
Share & tools
lore

Luck, Tony

author
#0 lore raw

PATCH 1/1 Fix section mismatch: ata_sff_exit

This build error showed up in linux-next tag next-20100820 for ia64:

WARNING: vmlinux.o(.init.text+0x4a952): Section mismatch in reference from the function ata_init() to the function .exit.text:ata_sff_exit() The function __init ata_init() references
a function __exit ata_sff_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
ata_sff_exit() so it may be used outside an exit section.

Sure enough, dropping the __exit fixes the problem.

---

Tejun: I didn't pin down which commit broke this ... but you seem to have a number of recent commits here.

drivers/ata/libata-sff.c +1 -1
index 57ea9c7..36b8855 100644
@@ -3326,7 +3326,7 @@ int __init ata_sff_init(void)
 	return 0;
 }
 
-void __exit ata_sff_exit(void)
+void ata_sff_exit(void)
 {
 	destroy_workqueue(ata_sff_wq);
 }
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Tony

This build error showed up in linux-next tag next-20100820 for ia64:

WARNING: vmlinux.o(.init.text+0x4a952): Section mismatch in reference from the function ata_init() to the function .exit.text:ata_sff_exit() The function __init ata_init() references
a function __exit ata_sff_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
ata_sff_exit() so it may be used outside an exit section.

Quoted 7 lines

Sure enough, dropping the __exit fixes the problem.

---

Tejun: I didn't pin down which commit broke this ... but you seem to have a number of recent commits here.

It's the scsi transport addition. It adds an init failure case where ata_sff_exit() is called to undo initialization, so your fix is correct.

Thanks.

Signature · 1 line
tejun