* [PATCH] net: fix mdio section mismatch warning
@ 2009-11-17 8:47 Stephen Rothwell
2009-11-17 12:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2009-11-17 8:47 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Laurent Pinchart, Paulius Zaleckas, Mark Ware
This fixes the following warning:
WARNING: drivers/net/phy/built-in.o(.devexit.text+0x70): Section mismatch in reference from the function .mdio_gpio_bus_destroy() to the function .devinit.text:.mdio_gpio_bus_deinit()
The function __devexit .mdio_gpio_bus_destroy() references
a function __devinit .mdio_gpio_bus_deinit().
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __devinit annotation of
.mdio_gpio_bus_deinit() so it may be used outside an init section.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/phy/mdio-gpio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 8659d34..3589713 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -139,7 +139,7 @@ out:
return NULL;
}
-static void __devinit mdio_gpio_bus_deinit(struct device *dev)
+static void mdio_gpio_bus_deinit(struct device *dev)
{
struct mii_bus *bus = dev_get_drvdata(dev);
struct mdio_gpio_info *bitbang = bus->priv;
--
1.6.5.2
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] net: fix mdio section mismatch warning
2009-11-17 8:47 [PATCH] net: fix mdio section mismatch warning Stephen Rothwell
@ 2009-11-17 12:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-11-17 12:06 UTC (permalink / raw)
To: sfr; +Cc: netdev, laurentp, paulius.zaleckas, mware
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 17 Nov 2009 19:47:33 +1100
> This fixes the following warning:
>
> WARNING: drivers/net/phy/built-in.o(.devexit.text+0x70): Section mismatch in reference from the function .mdio_gpio_bus_destroy() to the function .devinit.text:.mdio_gpio_bus_deinit()
> The function __devexit .mdio_gpio_bus_destroy() references
> a function __devinit .mdio_gpio_bus_deinit().
> This is often seen when error handling in the exit function
> uses functionality in the init path.
> The fix is often to remove the __devinit annotation of
> .mdio_gpio_bus_deinit() so it may be used outside an init section.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Applied to net-2.6, thanks Stephen.
I wish there was a better way to handle this kind of situation as it's
a quite common pattern (exit cleanup function used by device init
functions) because currently we end up not being able to put such
things into either init or exit sections.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-17 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17 8:47 [PATCH] net: fix mdio section mismatch warning Stephen Rothwell
2009-11-17 12:06 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox