netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: David Brownell <david-b@pacbell.net>
Cc: nico@cam.org, netdev@vger.kernel.org
Subject: Re: [patch 2.6.25-rc3] smc91x section fix
Date: Mon, 25 Feb 2008 07:02:20 +0100	[thread overview]
Message-ID: <20080225060220.GA12459@uranus.ravnborg.org> (raw)
In-Reply-To: <20080225033411.941C328DEAA@adsl-69-226-248-13.dsl.pltn13.pacbell.net>

On Sun, Feb 24, 2008 at 07:34:11PM -0800, David Brownell wrote:
> Section fixup:
> 
> WARNING: drivers/net/built-in.o(.text+0x1a2c): Section mismatch
> 	in reference from the function smc_drv_probe()
> 	to the function .init.text:smc_probe()
> The function smc_drv_probe() references
> the function __init smc_probe().
> This is often because smc_drv_probe lacks a __init
> annotation or the annotation of smc_probe is wrong.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---
>  drivers/net/smc91x.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/net/smc91x.c	2008-02-24 18:50:32.000000000 -0800
> +++ b/drivers/net/smc91x.c	2008-02-24 19:16:29.000000000 -0800
> @@ -2121,7 +2121,7 @@ static void smc_release_datacs(struct pl
>   *	0 --> there is a device
>   *	anything else, error
>   */
> -static int smc_drv_probe(struct platform_device *pdev)
> +static int __init smc_drv_probe(struct platform_device *pdev)
>  {
>  	struct net_device *ndev;
>  	struct resource *res, *ires;

>From a quick look this is wrong.
smc_drv_probe is assined the .probe member so it is used during
hotplug and thus should be __devinit.
Likewise smc_probe is used by smc_drv_probe and thus smc_probe
should be __devinit too.

So something like the appended. On my way out of the door so
not even build tested!


	Sam

diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 4020e9e..640bca5 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1775,7 +1775,7 @@ static int __init smc_findirq(void __iomem *ioaddr)
  * o  actually GRAB the irq.
  * o  GRAB the region
  */
-static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr,
+static int __devinit smc_probe(struct net_device *dev, void __iomem *ioaddr,
 			    unsigned long irq_flags)
 {
 	struct smc_local *lp = netdev_priv(dev);
@@ -2121,7 +2121,7 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device *
  *	0 --> there is a device
  *	anything else, error
  */
-static int smc_drv_probe(struct platform_device *pdev)
+static int __devinit smc_drv_probe(struct platform_device *pdev)
 {
 	struct net_device *ndev;
 	struct resource *res, *ires;

  reply	other threads:[~2008-02-25  6:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25  3:34 [patch 2.6.25-rc3] smc91x section fix David Brownell
2008-02-25  6:02 ` Sam Ravnborg [this message]
2008-02-25  6:33   ` David Brownell
2008-02-25 20:11     ` Sam Ravnborg
2008-04-19  3:01     ` [RESEND/UPDATED patch 2.6.25] " David Brownell
2008-04-25  6:02       ` Jeff Garzik
2008-07-25 20:11       ` David Brownell

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=20080225060220.GA12459@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=david-b@pacbell.net \
    --cc=netdev@vger.kernel.org \
    --cc=nico@cam.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).