Skip to content

Commit

Permalink
[SCSI] libfcoe: Fix section mismatch
Browse files Browse the repository at this point in the history
Recent changes to add fcoe_sysfs caused libfcoe_init to call fcoe_transport_exit
in a module initialization routine. The change resulted in the below error. This
patch removes the __exit keyword from the fcoe_transport_exit definition such
that it may be called from an __init routine.

WARNING: drivers/scsi/fcoe/libfcoe.o(.init.text+0x21): Section mismatch in reference from the function init_module() to the function .exit.text:fcoe_transp
exit()
The function __init init_module() references
a function __exit fcoe_transport_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
fcoe_transport_exit() so it may be used outside an exit section.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Mark Rustad authored and James Bottomley committed Jul 20, 2012
1 parent 7adc5a3 commit 87098bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/fcoe/fcoe_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ static int __init fcoe_transport_init(void)
return 0;
}

static int __exit fcoe_transport_exit(void)
static int fcoe_transport_exit(void)
{
struct fcoe_transport *ft;

Expand Down

0 comments on commit 87098bd

Please sign in to comment.