public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <robert.w.love@intel.com>
To: linux-scsi@vger.kernel.org, baryluk@smp.if.uj.edu.pl,
	linux-kernel@vger.kernel.org, JBottomley@parallels.com,
	devel@open-fcoe.org
Cc: Mark Rustad <mark.d.rustad@intel.com>, yi.zou@intel.com
Subject: [PATCH] libfcoe: Fix section mismatch
Date: Wed, 06 Jun 2012 11:59:48 -0700	[thread overview]
Message-ID: <20120606185948.26178.86781.stgit@fritz> (raw)
In-Reply-To: <138EA028228D124A900F5E6746F3C216286EAA65@ORSMSX102.amr.corp.intel.com>

From: Mark Rustad <mark.d.rustad@intel.com>

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>
---
 drivers/scsi/fcoe/fcoe_transport.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index b46f43d..71cc909 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -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;
 


  reply	other threads:[~2012-06-06 18:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-02 16:15 WARNING: arch/x86/built-in.o: Section mismatch in reference from the variable test_nmi_ipi_callback_na to function .ini.text:test_nmi_ipi_callback Witold Baryluk
2012-06-04 14:36 ` Don Zickus
2012-06-04 14:59   ` H. Peter Anvin
2012-06-04 15:08     ` Don Zickus
2012-06-04 16:35   ` Sam Ravnborg
2012-06-04 19:08     ` Different WARNING: drivers/scsi/fcoe/libfcoe.o(.init.text+0x1a): Section mismatch in reference from the function init_module() to the function .exit.text:fcoe_transport_exit() Witold Baryluk
2012-06-04 19:17       ` Sam Ravnborg
2012-06-04 20:52         ` Zou, Yi
2012-06-04 22:33           ` Sam Ravnborg
2012-06-04 23:11             ` Zou, Yi
2012-06-06 18:59               ` Robert Love [this message]
2012-06-06 19:58                 ` [PATCH] libfcoe: Fix section mismatch Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120606185948.26178.86781.stgit@fritz \
    --to=robert.w.love@intel.com \
    --cc=JBottomley@parallels.com \
    --cc=baryluk@smp.if.uj.edu.pl \
    --cc=devel@open-fcoe.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark.d.rustad@intel.com \
    --cc=yi.zou@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox