* [PATCH] Fix section mismatch: ata_sff_exit
@ 2010-08-23 20:18 Luck, Tony
2010-08-24 8:47 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Luck, Tony @ 2010-08-23 20:18 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-next, Jeff Garzik
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.
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
Tejun: I didn't pin down which commit broke this ... but you seem
to have a number of recent commits here.
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 57ea9c7..36b8855 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -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);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix section mismatch: ata_sff_exit
2010-08-23 20:18 [PATCH] Fix section mismatch: ata_sff_exit Luck, Tony
@ 2010-08-24 8:47 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2010-08-24 8:47 UTC (permalink / raw)
To: Luck, Tony, Jeff Garzik; +Cc: linux-next, linux-ide
On 08/23/2010 10:18 PM, Luck, Tony wrote:
> 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.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
>
> 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.
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-24 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23 20:18 [PATCH] Fix section mismatch: ata_sff_exit Luck, Tony
2010-08-24 8:47 ` Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.