Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio: fix section mismatch warnings

Fix fixes the following warnings by renaming the driver structures to be
suffixed with _driver.

WARNING: drivers/virtio/virtio_balloon.o(.data+0x88): Section mismatch in reference from the variable virtio_balloon to the function .devexit.text:virtballoon_remove()

WARNING: drivers/char/hw_random/virtio-rng.o(.data+0x88): Section mismatch in reference from the variable virtio_rng to the function .devexit.text:virtrng_remove()

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jeff Mahoney and committed by
Linus Torvalds
d817cd52 de3fab39

+6 -6
+3 -3
drivers/char/hw_random/virtio-rng.c
··· 114 114 { 0 }, 115 115 }; 116 116 117 - static struct virtio_driver virtio_rng = { 117 + static struct virtio_driver virtio_rng_driver = { 118 118 .driver.name = KBUILD_MODNAME, 119 119 .driver.owner = THIS_MODULE, 120 120 .id_table = id_table, ··· 124 124 125 125 static int __init init(void) 126 126 { 127 - return register_virtio_driver(&virtio_rng); 127 + return register_virtio_driver(&virtio_rng_driver); 128 128 } 129 129 130 130 static void __exit fini(void) 131 131 { 132 - unregister_virtio_driver(&virtio_rng); 132 + unregister_virtio_driver(&virtio_rng_driver); 133 133 } 134 134 module_init(init); 135 135 module_exit(fini);
+3 -3
drivers/virtio/virtio_balloon.c
··· 266 266 267 267 static unsigned int features[] = { VIRTIO_BALLOON_F_MUST_TELL_HOST }; 268 268 269 - static struct virtio_driver virtio_balloon = { 269 + static struct virtio_driver virtio_balloon_driver = { 270 270 .feature_table = features, 271 271 .feature_table_size = ARRAY_SIZE(features), 272 272 .driver.name = KBUILD_MODNAME, ··· 279 279 280 280 static int __init init(void) 281 281 { 282 - return register_virtio_driver(&virtio_balloon); 282 + return register_virtio_driver(&virtio_balloon_driver); 283 283 } 284 284 285 285 static void __exit fini(void) 286 286 { 287 - unregister_virtio_driver(&virtio_balloon); 287 + unregister_virtio_driver(&virtio_balloon_driver); 288 288 } 289 289 module_init(init); 290 290 module_exit(fini);