From: Adrian Bunk <bunk@stusta.de>
To: Nils Meyer <meyer@work.de>, Andrew Morton <akpm@osdl.org>,
"David S. Miller" <davem@davemloft.net>,
Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com, netdev@vger.kernel.org
Subject: [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit
Date: Wed, 21 Dec 2005 14:25:43 +0100 [thread overview]
Message-ID: <20051221132543.GG5359@stusta.de> (raw)
In-Reply-To: <200512211323.19242.meyer@work.de>
On Wed, Dec 21, 2005 at 01:23:18PM +0100, Nils Meyer wrote:
> Hi,
Hi Nils,
> When compiling 2.6.15-rc6 or 2.6.14.4 on my sparc I get the following error:
>
> local symbol 0: discarded in section `.exit.text' from drivers/built-in.o [*]
>
> After calling scripts/reference_discarded.pl it gives me the following error:
>
> Error: ./drivers/net/sungem.o .init.text refers to 0000000000000448
> R_SPARC_WDISP30 .exit.text
>...
thanks for this report.
The untested patch below should fix this bug (I'm assuming your .config
hasn't set CONFIG_HOTPLUG).
It's a real problem that these bugs have become runtime errors in
kernel 2.6 on i386 instead of link errors as they were in kernel 2.4 on
i386 (and are still in kernel kernel 2.6 on some other architectures
like sparc64) resulting in fewer people noticing them. :-(
> kind regards
> Nils Meyer
cu
Adrian
<-- snip -->
gem_remove_one() is called from the __devinit gem_init_one().
Therefore, gem_remove_one() mustn't be __devexit.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.15-rc6/drivers/net/sungem.c.old 2005-12-21 14:02:51.000000000 +0100
+++ linux-2.6.15-rc6/drivers/net/sungem.c 2005-12-21 14:03:37.000000000 +0100
@@ -2907,7 +2907,7 @@
return 0;
}
-static void __devexit gem_remove_one(struct pci_dev *pdev)
+static void gem_remove_one(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
@@ -3181,7 +3181,7 @@
.name = GEM_MODULE_NAME,
.id_table = gem_pci_tbl,
.probe = gem_init_one,
- .remove = __devexit_p(gem_remove_one),
+ .remove = gem_remove_one,
#ifdef CONFIG_PM
.suspend = gem_suspend,
.resume = gem_resume,
next parent reply other threads:[~2005-12-21 13:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200512211323.19242.meyer@work.de>
2005-12-21 13:25 ` Adrian Bunk [this message]
2005-12-22 2:50 ` [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit David S. Miller
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=20051221132543.GG5359@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=meyer@work.de \
--cc=netdev@vger.kernel.org \
--cc=torvalds@osdl.org \
/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;
as well as URLs for NNTP newsgroup(s).