Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] virtio_net: rename driver struct to please modpost

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


u.kleine-koenig at pengutronix

Nov 5, 2009, 12:17 AM

Post #1 of 1 (83 views)
Permalink
[PATCH] virtio_net: rename driver struct to please modpost

Commit

3d1285b (move virtnet_remove to .devexit.text)

introduced the first reference to __devexit in struct virtio_driver
virtio_net which upset modpost ("Section mismatch in reference from the
variable virtio_net to the function .devexit.text:virtnet_remove()").

Fix this by renaming virtio_net to virtio_net_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig [at] pengutronix>
Reported-by: Michael S. Tsirkin <mst [at] redhat>
Blame-taken-by: Rusty Russell <rusty [at] rustcorp>
Cc: Sam Ravnborg <sam [at] ravnborg>
Cc: David S. Miller <davem [at] davemloft>
Cc: Alex Williamson <alex.williamson [at] hp>
Cc: Mark McLoughlin <markmc [at] redhat>
Cc: netdev [at] vger
---
Hello,

@Rusty: IMHO there's no need to apologize. The driver was enhanced by
3d1285b and I consider it OK not to notice the (false) section warning.
(But if you think it was you who took my first patch, then you forgot to
add you S-o-b which is a worse trespass :-)

Best regards
Uwe

drivers/net/virtio_net.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 05630f2..b9e002f 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -998,7 +998,7 @@ static unsigned int features[] = {
VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN,
};

-static struct virtio_driver virtio_net = {
+static struct virtio_driver virtio_net_driver = {
.feature_table = features,
.feature_table_size = ARRAY_SIZE(features),
.driver.name = KBUILD_MODNAME,
@@ -1011,12 +1011,12 @@ static struct virtio_driver virtio_net = {

static int __init init(void)
{
- return register_virtio_driver(&virtio_net);
+ return register_virtio_driver(&virtio_net_driver);
}

static void __exit fini(void)
{
- unregister_virtio_driver(&virtio_net);
+ unregister_virtio_driver(&virtio_net_driver);
}
module_init(init);
module_exit(fini);
--
1.6.5.2


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.