netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NET] 3c59x: Fix several modpost warnings
@ 2007-03-08 15:33 Ralf Baechle
  2007-03-09 16:57 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Ralf Baechle @ 2007-03-08 15:33 UTC (permalink / raw)
  To: Andrew Morton, Jeff Garzik, netdev

WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4580) and 'vortex_eisa_remove'
WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4584) and 'vortex_eisa_remove'
WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4588) and 'vortex_eisa_remove'
WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x458c) and 'vortex_eisa_remove'

Fixed by:

 o move definition of vortex_eisa_driver below the functions it references.
 o remove now unnecessary prototypes for vortex_eisa_probe and
   vortex_eisa_remove.
 o Make vortex_eisa_probe an __init function.
 o Make vortex_eisa_remove a __devexit function.
 o Wrap vortex_eisa_driver reference to vortex_eisa_remove with
   __devexit_p().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 drivers/net/3c59x.c |   28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

Index: linux-mips/drivers/net/3c59x.c
===================================================================
--- linux-mips.orig/drivers/net/3c59x.c
+++ linux-mips/drivers/net/3c59x.c
@@ -858,19 +858,7 @@ static struct eisa_device_id vortex_eisa
 };
 MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids);
 
-static int vortex_eisa_probe(struct device *device);
-static int vortex_eisa_remove(struct device *device);
-
-static struct eisa_driver vortex_eisa_driver = {
-	.id_table = vortex_eisa_ids,
-	.driver   = {
-		.name    = "3c59x",
-		.probe   = vortex_eisa_probe,
-		.remove  = vortex_eisa_remove
-	}
-};
-
-static int vortex_eisa_probe(struct device *device)
+static int __init vortex_eisa_probe(struct device *device)
 {
 	void __iomem *ioaddr;
 	struct eisa_device *edev;
@@ -893,7 +881,7 @@ static int vortex_eisa_probe(struct devi
 	return 0;
 }
 
-static int vortex_eisa_remove(struct device *device)
+static int __devexit vortex_eisa_remove(struct device *device)
 {
 	struct eisa_device *edev;
 	struct net_device *dev;
@@ -918,7 +906,17 @@ static int vortex_eisa_remove(struct dev
 	free_netdev(dev);
 	return 0;
 }
-#endif
+
+static struct eisa_driver vortex_eisa_driver = {
+	.id_table = vortex_eisa_ids,
+	.driver   = {
+		.name    = "3c59x",
+		.probe   = vortex_eisa_probe,
+		.remove  = __devexit_p(vortex_eisa_remove)
+	}
+};
+
+#endif /* CONFIG_EISA */
 
 /* returns count found (>= 0), or negative on error */
 static int __init vortex_eisa_init(void)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [NET] 3c59x: Fix several modpost warnings
  2007-03-08 15:33 [NET] 3c59x: Fix several modpost warnings Ralf Baechle
@ 2007-03-09 16:57 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-03-09 16:57 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Andrew Morton, netdev

Ralf Baechle wrote:
> WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4580) and 'vortex_eisa_remove'
> WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4584) and 'vortex_eisa_remove'
> WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4588) and 'vortex_eisa_remove'
> WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x458c) and 'vortex_eisa_remove'
> 
> Fixed by:
> 
>  o move definition of vortex_eisa_driver below the functions it references.
>  o remove now unnecessary prototypes for vortex_eisa_probe and
>    vortex_eisa_remove.
>  o Make vortex_eisa_probe an __init function.
>  o Make vortex_eisa_remove a __devexit function.
>  o Wrap vortex_eisa_driver reference to vortex_eisa_remove with
>    __devexit_p().
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> 
>  drivers/net/3c59x.c |   28 +++++++++++++---------------
>  1 file changed, 13 insertions(+), 15 deletions(-)

applied this and ibmtr patch



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-09 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-08 15:33 [NET] 3c59x: Fix several modpost warnings Ralf Baechle
2007-03-09 16:57 ` Jeff Garzik

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).