Skip to contentSkip to conversation

treewide: eliminate anonymous module_init & module_exit

PATCH Applied Randy Dunlap 14 participants 33 messages Mar 16, 2022 – Apr 8, 2022

Subsystems (18)
Networking Network drivers x86 SCSI +14 more subsystems
lore
Share & tools
lore
#0 lore raw

cover treewide: eliminate anonymous module_init & module_exit

There are a number of drivers that use "module_init(init)" and "module_exit(exit)", which are anonymous names and can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init
ffffffff832fca05 t init
ffffffff832fcbd2 t init
ffffffff83328f0e t init
ffffffff8332c5b1 t init
ffffffff8332d9eb t init
ffffffff8332f0aa t init
ffffffff83330e25 t init
ffffffff833317a5 t init
ffffffff8333dd6b t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs calling init+0x0/0x73 @ 1
initcall init+0x0/0x73 returned 0 after 6 usecs calling init+0x0/0x73 @ 1
initcall init+0x0/0x73 returned 0 after 4 usecs calling init+0x0/0xf5 @ 1
initcall init+0x0/0xf5 returned 0 after 27 usecs calling init+0x0/0x7d @ 1
initcall init+0x0/0x7d returned 0 after 11 usecs calling init+0x0/0xc9 @ 1
initcall init+0x0/0xc9 returned 0 after 19 usecs calling init+0x0/0x9d @ 1
initcall init+0x0/0x9d returned 0 after 37 usecs calling init+0x0/0x63f @ 1
initcall init+0x0/0x63f returned 0 after 411 usecs calling init+0x0/0x171 @ 1
initcall init+0x0/0x171 returned 0 after 61 usecs calling init+0x0/0xef @ 1
initcall init+0x0/0xef returned 0 after 3 usecs

Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc Jens Axboe <[email protected]>
Cc Amit Shah <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Eli Cohen <[email protected]>
Cc Saeed Mahameed <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Pablo Neira Ayuso <[email protected]>
Cc Jozsef Kadlecsik <[email protected]>
Cc Florian Westphal <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Michał Mirosław <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Krzysztof Opasiak <[email protected]>
Cc Igor Kotrasinski <[email protected]>
Cc Valentina Manea <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Jussi Kivilinna <[email protected]>
Cc Joachim Fritschi <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>

patches:
[PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit [PATCH 3/9] net: mlx5: eliminate anonymous module_init & module_exit [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit [PATCH 7/9] usb: usbip: eliminate anonymous module_init & module_exit [PATCH 8/9] x86/crypto: eliminate anonymous module_init & module_exit [PATCH 9/9] testmmiotrace: eliminate anonymous module_init & module_exit

diffstat:

 arch/x86/crypto/blowfish_glue.c                |    8 ++++----
 arch/x86/crypto/camellia_glue.c                |    8 ++++----
 arch/x86/crypto/serpent_avx2_glue.c            |    8 ++++----
 arch/x86/crypto/twofish_glue.c                 |    8 ++++----
 arch/x86/crypto/twofish_glue_3way.c            |    8 ++++----
 arch/x86/mm/testmmiotrace.c                    |    8 ++++----
 drivers/block/virtio_blk.c                     |    8 ++++----
 drivers/char/virtio_console.c                  |    8 ++++----
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    8 ++++----
 drivers/scsi/virtio_scsi.c                     |    8 ++++----
 drivers/usb/gadget/legacy/inode.c              |    8 ++++----
 drivers/usb/gadget/legacy/serial.c             |   10 +++++-----
 drivers/usb/gadget/udc/dummy_hcd.c             |    8 ++++----
 drivers/usb/usbip/vudc_main.c                  |    8 ++++----
 net/ipv4/netfilter/nf_nat_h323.c               |    8 ++++----
 15 files changed, 61 insertions(+), 61 deletions(-)
#1 lore raw

PATCH 1/9 virtio_blk: eliminate anonymous module_init & module_exit

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes e467cde23818 ("Block driver using virtio.")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc Jens Axboe <[email protected]>
---
 drivers/block/virtio_blk.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/block/virtio_blk.c +4 -4
@@ -1058,7 +1058,7 @@ static struct virtio_driver virtio_blk =
 #endif
 };
 
-static int __init init(void)
+static int __init virtio_blk_init(void)
 {
 	int error;
 
@@ -1084,14 +1084,14 @@ out_destroy_workqueue:
 	return error;
 }
 
-static void __exit fini(void)
+static void __exit virtio_blk_fini(void)
 {
 	unregister_virtio_driver(&virtio_blk);
 	unregister_blkdev(major, "virtblk");
 	destroy_workqueue(virtblk_wq);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_blk_init);
+module_exit(virtio_blk_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio block driver");
Acked-by on v1 1/9
#2 lore raw

Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit

Quoted 30 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes e467cde23818 ("Block driver using virtio.")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc Jens Axboe <[email protected]>
Quoted 1 line

---

Quoted 23 lines
 drivers/block/virtio_blk.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/block/virtio_blk.c +2 -2
@@ -1058,7 +1058,7 @@ static struct virtio_driver virtio_blk =
 #endif
 };
 
-static int __init init(void)
+static int __init virtio_blk_init(void)
 {
        int error;
 
@@ -1084,14 +1084,14 @@ out_destroy_workqueue:
        return error;
 }
 
-static void __exit fini(void)
+static void __exit virtio_blk_fini(void)
 {
        unregister_virtio_driver(&virtio_blk);

drivers/block/virtio_blk.c out_destroy_workqueue: · line 1097

Quoted 10 lines
drivers/block/virtio_blk.c +2 -2
        unregister_blkdev(major, "virtblk");
        destroy_workqueue(virtblk_wq);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_blk_init);
+module_exit(virtio_blk_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio block driver");

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

reviewer Reviewed-by on v1 1/9
#3 lore raw

Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap
Quoted 53 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes e467cde23818 ("Block driver using virtio.")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc Jens Axboe <[email protected]>
---
 drivers/block/virtio_blk.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/block/virtio_blk.c +2 -2
@@ -1058,7 +1058,7 @@ static struct virtio_driver virtio_blk =
 #endif
 };
 
-static int __init init(void)
+static int __init virtio_blk_init(void)
 {
 	int error;
 
@@ -1084,14 +1084,14 @@ out_destroy_workqueue:
 	return error;
 }
 
-static void __exit fini(void)
+static void __exit virtio_blk_fini(void)
 {
 	unregister_virtio_driver(&virtio_blk);

drivers/block/virtio_blk.c out_destroy_workqueue: · line 1097

Quoted 10 lines
drivers/block/virtio_blk.c +2 -2
 	unregister_blkdev(major, "virtblk");
 	destroy_workqueue(virtblk_wq);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_blk_init);
+module_exit(virtio_blk_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio block driver");
maintainer Acked-by on v1 1/9
#4 lore raw

Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap
Quoted 20 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 9 lines
Fixes e467cde23818 ("Block driver using virtio.")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc Jens Axboe <[email protected]>

If this is done tree-wide, it's ok to do it for virtio too.

No real opinion on whether it's a good idea.

Quoted 33 lines
---
 drivers/block/virtio_blk.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/block/virtio_blk.c +4 -4
@@ -1058,7 +1058,7 @@ static struct virtio_driver virtio_blk =
 #endif
 };
 
-static int __init init(void)
+static int __init virtio_blk_init(void)
 {
 	int error;
 
@@ -1084,14 +1084,14 @@ out_destroy_workqueue:
 	return error;
 }
 
-static void __exit fini(void)
+static void __exit virtio_blk_fini(void)
 {
 	unregister_virtio_driver(&virtio_blk);
 	unregister_blkdev(major, "virtblk");
 	destroy_workqueue(virtblk_wq);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_blk_init);
+module_exit(virtio_blk_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio block driver");
#5 lore raw

PATCH 2/9 virtio_console: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 31610434bc35 ("Virtio console driver")
Fixes 7177876fea83 ("virtio: console: Add ability to remove module")
Cc Amit Shah <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/char/virtio_console.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/char/virtio_console.c +4 -4
@@ -2245,7 +2245,7 @@ static struct virtio_driver virtio_rproc
 	.remove =	virtcons_remove,
 };
 
-static int __init init(void)
+static int __init virtio_console_init(void)
 {
 	int err;
 
@@ -2280,7 +2280,7 @@ free:
 	return err;
 }
 
-static void __exit fini(void)
+static void __exit virtio_console_fini(void)
 {
 	reclaim_dma_bufs();
 
@@ -2290,8 +2290,8 @@ static void __exit fini(void)
 	class_destroy(pdrvdata.class);
 	debugfs_remove_recursive(pdrvdata.debugfs_dir);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_console_init);
+module_exit(virtio_console_fini);
 
 MODULE_DESCRIPTION("Virtio console driver");
 MODULE_LICENSE("GPL");
Reviewed-by on v1 2/9
#6 lore raw

Re: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit

Quoted 34 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 31610434bc35 ("Virtio console driver")
Fixes 7177876fea83 ("virtio: console: Add ability to remove module")
Signed-off-by Randy Dunlap <

[email protected]

Quoted 1 line

Cc: Amit Shah <
[email protected]

Quoted 1 line

Cc:
[email protected]

Cc: Arnd Bergmann <
[email protected]

Quoted 1 line
Quoted 6 lines

Cc: Greg Kroah-Hartman <
[email protected]

Quoted 1 line
---
 drivers/char/virtio_console.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

I don't think the Fixes-by really applies here, though - we don't really want to push this into stable, nor do we want any automated tools to pick this up because of that tag..

Amit

#7 lore raw

Re: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit

Quoted 42 lines · Amit Shah
Quoted 34 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 31610434bc35 ("Virtio console driver")
Fixes 7177876fea83 ("virtio: console: Add ability to remove module")
Signed-off-by Randy Dunlap <

[email protected]

Quoted 1 line

Cc: Amit Shah <
[email protected]

Quoted 1 line

Cc:
[email protected]

Cc: Arnd Bergmann <
[email protected]

Quoted 1 line
Quoted 6 lines

Cc: Greg Kroah-Hartman <
[email protected]

Quoted 1 line
---
 drivers/char/virtio_console.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Quoted 5 lines

I don't think the Fixes-by really applies here, though - we don't really want to push this into stable, nor do we want any automated tools to pick this up because of that tag..

Yeah, I'm fine with that.

thanks.

Signature · 1 line
~Randy
maintainer Acked-by on v1 2/9
#8 lore raw

Re: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap
Quoted 20 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 7 lines
Fixes 31610434bc35 ("Virtio console driver")
Fixes 7177876fea83 ("virtio: console: Add ability to remove module")
Cc Amit Shah <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

If this is done tree-wide, it's ok to do it for virtio too.

No real opinion on whether it's a good idea.

Quoted 35 lines
---
 drivers/char/virtio_console.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/char/virtio_console.c +4 -4
@@ -2245,7 +2245,7 @@ static struct virtio_driver virtio_rproc
 	.remove =	virtcons_remove,
 };
 
-static int __init init(void)
+static int __init virtio_console_init(void)
 {
 	int err;
 
@@ -2280,7 +2280,7 @@ free:
 	return err;
 }
 
-static void __exit fini(void)
+static void __exit virtio_console_fini(void)
 {
 	reclaim_dma_bufs();
 
@@ -2290,8 +2290,8 @@ static void __exit fini(void)
 	class_destroy(pdrvdata.class);
 	debugfs_remove_recursive(pdrvdata.debugfs_dir);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_console_init);
+module_exit(virtio_console_fini);
 
 MODULE_DESCRIPTION("Virtio console driver");
 MODULE_LICENSE("GPL");
#9 lore raw

PATCH 3/9 net: mlx5: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Cc Eli Cohen <[email protected]>
Cc Saeed Mahameed <[email protected]>
Cc Leon Romanovsky <[email protected]>
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/main.c +4 -4
@@ -1893,7 +1893,7 @@ static void mlx5_core_verify_params(void
 	}
 }
 
-static int __init init(void)
+static int __init mlx5_init(void)
 {
 	int err;
 
@@ -1929,7 +1929,7 @@ err_debug:
 	return err;
 }
 
-static void __exit cleanup(void)
+static void __exit mlx5_cleanup(void)
 {
 	mlx5e_cleanup();
 	mlx5_sf_driver_unregister();
@@ -1937,5 +1937,5 @@ static void __exit cleanup(void)
 	mlx5_unregister_debugfs();
 }
 
-module_init(init);
-module_exit(cleanup);
+module_init(mlx5_init);
+module_exit(mlx5_cleanup);
Reviewed-by on v1 3/9
#10 lore raw

Re: [PATCH 3/9] net: mlx5: eliminate anonymous module_init & module_exit

Quoted 27 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Cc Eli Cohen <[email protected]>
Cc Saeed Mahameed <[email protected]>
Cc Leon Romanovsky <[email protected]>
Quoted 4 lines
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Thanks,

#11 lore raw

PATCH 4/9 netfilter: h323: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port")
Cc Pablo Neira Ayuso <[email protected]>
Cc Jozsef Kadlecsik <[email protected]>
Cc Florian Westphal <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
---
 net/ipv4/netfilter/nf_nat_h323.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
net/ipv4/netfilter/nf_nat_h323.c +4 -4
@@ -580,7 +580,7 @@ static struct nf_ct_helper_expectfn call
 };
 
 /****************************************************************************/
-static int __init init(void)
+static int __init nf_nat_h323_init(void)
 {
 	BUG_ON(set_h245_addr_hook != NULL);
 	BUG_ON(set_h225_addr_hook != NULL);
@@ -607,7 +607,7 @@ static int __init init(void)
 }
 
 /****************************************************************************/
-static void __exit fini(void)
+static void __exit nf_nat_h323_fini(void)
 {
 	RCU_INIT_POINTER(set_h245_addr_hook, NULL);
 	RCU_INIT_POINTER(set_h225_addr_hook, NULL);
@@ -624,8 +624,8 @@ static void __exit fini(void)
 }
 
 /****************************************************************************/
-module_init(init);
-module_exit(fini);
+module_init(nf_nat_h323_init);
+module_exit(nf_nat_h323_fini);
 
 MODULE_AUTHOR("Jing Min Zhao <[email protected]>");
 MODULE_DESCRIPTION("H.323 NAT helper");
maintainer Acked-by on v1 4/9
#12 lore raw

Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit

Quoted 20 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 2 lines
Fixes f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port")
#13 lore raw

Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap
Quoted 12 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Quoted 7 lines

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

LGTM.

Should I route this through the netfilter tree?

Quoted 45 lines
Fixes f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port")
Cc Pablo Neira Ayuso <[email protected]>
Cc Jozsef Kadlecsik <[email protected]>
Cc Florian Westphal <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
---
 net/ipv4/netfilter/nf_nat_h323.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
net/ipv4/netfilter/nf_nat_h323.c +4 -4
@@ -580,7 +580,7 @@ static struct nf_ct_helper_expectfn call
 };
 
 /****************************************************************************/
-static int __init init(void)
+static int __init nf_nat_h323_init(void)
 {
 	BUG_ON(set_h245_addr_hook != NULL);
 	BUG_ON(set_h225_addr_hook != NULL);
@@ -607,7 +607,7 @@ static int __init init(void)
 }
 
 /****************************************************************************/
-static void __exit fini(void)
+static void __exit nf_nat_h323_fini(void)
 {
 	RCU_INIT_POINTER(set_h245_addr_hook, NULL);
 	RCU_INIT_POINTER(set_h225_addr_hook, NULL);
@@ -624,8 +624,8 @@ static void __exit fini(void)
 }
 
 /****************************************************************************/
-module_init(init);
-module_exit(fini);
+module_init(nf_nat_h323_init);
+module_exit(nf_nat_h323_fini);
 
 MODULE_AUTHOR("Jing Min Zhao <[email protected]>");
 MODULE_DESCRIPTION("H.323 NAT helper");
#14 lore raw

Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit

Quoted 21 lines · Pablo Neira Ayuso
Quoted 12 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Quoted 7 lines

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 3 lines

LGTM.

Should I route this through the netfilter tree?

Yes, please.
Thanks.

Quoted 46 lines
Quoted 46 lines
Fixes f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port")
Cc Pablo Neira Ayuso <[email protected]>
Cc Jozsef Kadlecsik <[email protected]>
Cc Florian Westphal <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
---
 net/ipv4/netfilter/nf_nat_h323.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
net/ipv4/netfilter/nf_nat_h323.c +4 -4
@@ -580,7 +580,7 @@ static struct nf_ct_helper_expectfn call
 };
 
 /****************************************************************************/
-static int __init init(void)
+static int __init nf_nat_h323_init(void)
 {
 	BUG_ON(set_h245_addr_hook != NULL);
 	BUG_ON(set_h225_addr_hook != NULL);
@@ -607,7 +607,7 @@ static int __init init(void)
 }
 
 /****************************************************************************/
-static void __exit fini(void)
+static void __exit nf_nat_h323_fini(void)
 {
 	RCU_INIT_POINTER(set_h245_addr_hook, NULL);
 	RCU_INIT_POINTER(set_h225_addr_hook, NULL);
@@ -624,8 +624,8 @@ static void __exit fini(void)
 }
 
 /****************************************************************************/
-module_init(init);
-module_exit(fini);
+module_init(nf_nat_h323_init);
+module_exit(nf_nat_h323_fini);
 
 MODULE_AUTHOR("Jing Min Zhao <[email protected]>");
 MODULE_DESCRIPTION("H.323 NAT helper");
Signature · 1 line
~Randy
maintainer Applied
#15 lore raw

Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

[ trimmed off Cc list ]

Quoted 12 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Quoted 7 lines

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Applied to nf-next, thanks.

#16 lore raw

PATCH 5/9 virtio-scsi: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
---
 drivers/scsi/virtio_scsi.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/virtio_scsi.c +4 -4
@@ -988,7 +988,7 @@ static struct virtio_driver virtio_scsi_
 	.remove = virtscsi_remove,
 };
 
-static int __init init(void)
+static int __init virtio_scsi_init(void)
 {
 	int ret = -ENOMEM;
 
@@ -1020,14 +1020,14 @@ error:
 	return ret;
 }
 
-static void __exit fini(void)
+static void __exit virtio_scsi_fini(void)
 {
 	unregister_virtio_driver(&virtio_scsi_driver);
 	mempool_destroy(virtscsi_cmd_pool);
 	kmem_cache_destroy(virtscsi_cmd_cache);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_scsi_init);
+module_exit(virtio_scsi_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio SCSI HBA driver");
Acked-by on v1 5/9
#17 lore raw

Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit

Quoted 21 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 10 lines
Fixes 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
Quoted 24 lines
---
 drivers/scsi/virtio_scsi.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/virtio_scsi.c +2 -2
@@ -988,7 +988,7 @@ static struct virtio_driver virtio_scsi_
        .remove = virtscsi_remove,
 };
 
-static int __init init(void)
+static int __init virtio_scsi_init(void)
 {
        int ret = -ENOMEM;
 
@@ -1020,14 +1020,14 @@ error:
        return ret;
 }
 
-static void __exit fini(void)
+static void __exit virtio_scsi_fini(void)
 {
        unregister_virtio_driver(&virtio_scsi_driver);

drivers/scsi/virtio_scsi.c error: · line 1033

Quoted 10 lines
drivers/scsi/virtio_scsi.c +2 -2
        mempool_destroy(virtscsi_cmd_pool);
        kmem_cache_destroy(virtscsi_cmd_cache);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_scsi_init);
+module_exit(virtio_scsi_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio SCSI HBA driver");

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

reviewer Reviewed-by on v1 5/9
#18 lore raw

Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap
Quoted 54 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
---
 drivers/scsi/virtio_scsi.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/virtio_scsi.c +2 -2
@@ -988,7 +988,7 @@ static struct virtio_driver virtio_scsi_
 	.remove = virtscsi_remove,
 };
 
-static int __init init(void)
+static int __init virtio_scsi_init(void)
 {
 	int ret = -ENOMEM;
 
@@ -1020,14 +1020,14 @@ error:
 	return ret;
 }
 
-static void __exit fini(void)
+static void __exit virtio_scsi_fini(void)
 {
 	unregister_virtio_driver(&virtio_scsi_driver);

drivers/scsi/virtio_scsi.c error: · line 1033

Quoted 10 lines
drivers/scsi/virtio_scsi.c +2 -2
 	mempool_destroy(virtscsi_cmd_pool);
 	kmem_cache_destroy(virtscsi_cmd_cache);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_scsi_init);
+module_exit(virtio_scsi_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio SCSI HBA driver");
maintainer Acked-by on v1 5/9
#19 lore raw

Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap
Quoted 20 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 10 lines
Fixes 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines")
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>

If this is done tree-wide, it's ok to do it for virtio too.

No real opinion on whether it's a good idea.

Quoted 33 lines
---
 drivers/scsi/virtio_scsi.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/virtio_scsi.c +4 -4
@@ -988,7 +988,7 @@ static struct virtio_driver virtio_scsi_
 	.remove = virtscsi_remove,
 };
 
-static int __init init(void)
+static int __init virtio_scsi_init(void)
 {
 	int ret = -ENOMEM;
 
@@ -1020,14 +1020,14 @@ error:
 	return ret;
 }
 
-static void __exit fini(void)
+static void __exit virtio_scsi_fini(void)
 {
 	unregister_virtio_driver(&virtio_scsi_driver);
 	mempool_destroy(virtscsi_cmd_pool);
 	kmem_cache_destroy(virtscsi_cmd_cache);
 }
-module_init(init);
-module_exit(fini);
+module_init(virtio_scsi_init);
+module_exit(virtio_scsi_fini);
 
 MODULE_DEVICE_TABLE(virtio, id_table);
 MODULE_DESCRIPTION("Virtio SCSI HBA driver");
#20 lore raw

Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Randy,

Quoted 3 lines

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Applied to 5.18/scsi-staging, thanks!

Signature · 5 lines
Martin K. Petersen	Oracle Linux Engineering
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#21 lore raw

PATCH 6/9 usb: gadget: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes bd25a14edb75 ("usb: gadget: legacy/serial: allow dynamic removal")
Fixes 7bb5ea54be47 ("usb gadget serial: use composite gadget framework")
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc Felipe Balbi <[email protected]>
Cc Michał Mirosław <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
---
 drivers/usb/gadget/legacy/inode.c  |    8 ++++----
 drivers/usb/gadget/legacy/serial.c |   10 +++++-----
 drivers/usb/gadget/udc/dummy_hcd.c |    8 ++++----
 3 files changed, 13 insertions(+), 13 deletions(-)
drivers/usb/gadget/legacy/serial.c +5 -5
@@ -273,7 +273,7 @@ static struct usb_composite_driver gseri
 static int switch_gserial_enable(bool do_enable)
 {
 	if (!serial_config_driver.label)
-		/* init() was not called, yet */
+		/* gserial_init() was not called, yet */
 		return 0;
 
 	if (do_enable)
@@ -283,7 +283,7 @@ static int switch_gserial_enable(bool do
 	return 0;
 }
 
-static int __init init(void)
+static int __init gserial_init(void)
 {
 	/* We *could* export two configs; that'd be much cleaner...
 	 * but neither of these product IDs was defined that way.
@@ -314,11 +314,11 @@ static int __init init(void)
 
 	return usb_composite_probe(&gserial_driver);
 }
-module_init(init);
+module_init(gserial_init);
 
-static void __exit cleanup(void)
+static void __exit gserial_cleanup(void)
 {
 	if (enable)
 		usb_composite_unregister(&gserial_driver);
 }
-module_exit(cleanup);
+module_exit(gserial_cleanup);
drivers/usb/gadget/udc/dummy_hcd.c +4 -4
@@ -2765,7 +2765,7 @@ static struct platform_driver dummy_hcd_
 static struct platform_device *the_udc_pdev[MAX_NUM_UDC];
 static struct platform_device *the_hcd_pdev[MAX_NUM_UDC];
 
-static int __init init(void)
+static int __init dummy_hcd_init(void)
 {
 	int	retval = -ENOMEM;
 	int	i;
@@ -2887,9 +2887,9 @@ err_alloc_udc:
 		platform_device_put(the_hcd_pdev[i]);
 	return retval;
 }
-module_init(init);
+module_init(dummy_hcd_init);
 
-static void __exit cleanup(void)
+static void __exit dummy_hcd_cleanup(void)
 {
 	int i;
 
@@ -2905,4 +2905,4 @@ static void __exit cleanup(void)
 	platform_driver_unregister(&dummy_udc_driver);
 	platform_driver_unregister(&dummy_hcd_driver);
 }
-module_exit(cleanup);
+module_exit(dummy_hcd_cleanup);
drivers/usb/gadget/legacy/inode.c +4 -4
@@ -2101,7 +2101,7 @@ MODULE_ALIAS_FS("gadgetfs");
 
 /*----------------------------------------------------------------------*/
 
-static int __init init (void)
+static int __init gadgetfs_init (void)
 {
 	int status;
 
@@ -2111,12 +2111,12 @@ static int __init init (void)
 			shortname, driver_desc);
 	return status;
 }
-module_init (init);
+module_init (gadgetfs_init);
 
-static void __exit cleanup (void)
+static void __exit gadgetfs_cleanup (void)
 {
 	pr_debug ("unregister %s\n", shortname);
 	unregister_filesystem (&gadgetfs_type);
 }
-module_exit (cleanup);
+module_exit (gadgetfs_cleanup);
 
Reviewed-by on v1 6/9
#22 lore raw

Re: [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit

Quoted 20 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 3 lines
Fixes bd25a14edb75 ("usb: gadget: legacy/serial: allow dynamic removal")
Fixes 7bb5ea54be47 ("usb gadget serial: use composite gadget framework")
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")

I continue to be confused about the latest rules for the Fixes tag but this one in particular seems completely useless. This is the 'beginning of time' commit by Linus AFAICT. So do any of these Fixes tags need to be in this series?

Regardless:

Quoted 93 lines
Cc Felipe Balbi <[email protected]>
Cc Michał Mirosław <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
---
 drivers/usb/gadget/legacy/inode.c  |    8 ++++----
 drivers/usb/gadget/legacy/serial.c |   10 +++++-----
 drivers/usb/gadget/udc/dummy_hcd.c |    8 ++++----
 3 files changed, 13 insertions(+), 13 deletions(-)
drivers/usb/gadget/legacy/serial.c +5 -5
@@ -273,7 +273,7 @@ static struct usb_composite_driver gseri
 static int switch_gserial_enable(bool do_enable)
 {
 	if (!serial_config_driver.label)
-		/* init() was not called, yet */
+		/* gserial_init() was not called, yet */
 		return 0;
 
 	if (do_enable)
@@ -283,7 +283,7 @@ static int switch_gserial_enable(bool do
 	return 0;
 }
 
-static int __init init(void)
+static int __init gserial_init(void)
 {
 	/* We *could* export two configs; that'd be much cleaner...
 	 * but neither of these product IDs was defined that way.
@@ -314,11 +314,11 @@ static int __init init(void)
 
 	return usb_composite_probe(&gserial_driver);
 }
-module_init(init);
+module_init(gserial_init);
 
-static void __exit cleanup(void)
+static void __exit gserial_cleanup(void)
 {
 	if (enable)
 		usb_composite_unregister(&gserial_driver);
 }
-module_exit(cleanup);
+module_exit(gserial_cleanup);
drivers/usb/gadget/udc/dummy_hcd.c +4 -4
@@ -2765,7 +2765,7 @@ static struct platform_driver dummy_hcd_
 static struct platform_device *the_udc_pdev[MAX_NUM_UDC];
 static struct platform_device *the_hcd_pdev[MAX_NUM_UDC];
 
-static int __init init(void)
+static int __init dummy_hcd_init(void)
 {
 	int	retval = -ENOMEM;
 	int	i;
@@ -2887,9 +2887,9 @@ err_alloc_udc:
 		platform_device_put(the_hcd_pdev[i]);
 	return retval;
 }
-module_init(init);
+module_init(dummy_hcd_init);
 
-static void __exit cleanup(void)
+static void __exit dummy_hcd_cleanup(void)
 {
 	int i;
 
@@ -2905,4 +2905,4 @@ static void __exit cleanup(void)
 	platform_driver_unregister(&dummy_udc_driver);
 	platform_driver_unregister(&dummy_hcd_driver);
 }
-module_exit(cleanup);
+module_exit(dummy_hcd_cleanup);
drivers/usb/gadget/legacy/inode.c +2 -2
@@ -2101,7 +2101,7 @@ MODULE_ALIAS_FS("gadgetfs");
 
 /*----------------------------------------------------------------------*/
 
-static int __init init (void)
+static int __init gadgetfs_init (void)
 {
 	int status;
 
@@ -2111,12 +2111,12 @@ static int __init init (void)
 			shortname, driver_desc);
 	return status;
 }
-module_init (init);
+module_init (gadgetfs_init);

drivers/usb/gadget/legacy/inode.c static int __init init (void) · line 2122

Quoted 10 lines
drivers/usb/gadget/legacy/inode.c +2 -2
 
-static void __exit cleanup (void)
+static void __exit gadgetfs_cleanup (void)
 {
 	pr_debug ("unregister %s\n", shortname);
 	unregister_filesystem (&gadgetfs_type);
 }
-module_exit (cleanup);
+module_exit (gadgetfs_cleanup);
 

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#23 lore raw

Re: [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit

Quoted 21 lines · Ira Weiny
Quoted 20 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 7 lines
Quoted 3 lines
Fixes bd25a14edb75 ("usb: gadget: legacy/serial: allow dynamic removal")
Fixes 7bb5ea54be47 ("usb gadget serial: use composite gadget framework")
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")

I continue to be confused about the latest rules for the Fixes tag but this one in particular seems completely useless. This is the 'beginning of time' commit by Linus AFAICT. So do any of these Fixes tags need to be in this series?

I guess it mostly depends on whether they get applied to stable trees, but it's entirely fine with me if they don't.

{I also corrected Felipe's email address here.}

Quoted 3 lines

Regardless:

Thanks.

Quoted 104 lines
Quoted 104 lines
Cc Felipe Balbi <[email protected]>
Cc Michał Mirosław <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
---
 drivers/usb/gadget/legacy/inode.c  |    8 ++++----
 drivers/usb/gadget/legacy/serial.c |   10 +++++-----
 drivers/usb/gadget/udc/dummy_hcd.c |    8 ++++----
 3 files changed, 13 insertions(+), 13 deletions(-)
drivers/usb/gadget/legacy/serial.c +5 -5
@@ -273,7 +273,7 @@ static struct usb_composite_driver gseri
 static int switch_gserial_enable(bool do_enable)
 {
 	if (!serial_config_driver.label)
-		/* init() was not called, yet */
+		/* gserial_init() was not called, yet */
 		return 0;
 
 	if (do_enable)
@@ -283,7 +283,7 @@ static int switch_gserial_enable(bool do
 	return 0;
 }
 
-static int __init init(void)
+static int __init gserial_init(void)
 {
 	/* We *could* export two configs; that'd be much cleaner...
 	 * but neither of these product IDs was defined that way.
@@ -314,11 +314,11 @@ static int __init init(void)
 
 	return usb_composite_probe(&gserial_driver);
 }
-module_init(init);
+module_init(gserial_init);
 
-static void __exit cleanup(void)
+static void __exit gserial_cleanup(void)
 {
 	if (enable)
 		usb_composite_unregister(&gserial_driver);
 }
-module_exit(cleanup);
+module_exit(gserial_cleanup);
drivers/usb/gadget/udc/dummy_hcd.c +4 -4
@@ -2765,7 +2765,7 @@ static struct platform_driver dummy_hcd_
 static struct platform_device *the_udc_pdev[MAX_NUM_UDC];
 static struct platform_device *the_hcd_pdev[MAX_NUM_UDC];
 
-static int __init init(void)
+static int __init dummy_hcd_init(void)
 {
 	int	retval = -ENOMEM;
 	int	i;
@@ -2887,9 +2887,9 @@ err_alloc_udc:
 		platform_device_put(the_hcd_pdev[i]);
 	return retval;
 }
-module_init(init);
+module_init(dummy_hcd_init);
 
-static void __exit cleanup(void)
+static void __exit dummy_hcd_cleanup(void)
 {
 	int i;
 
@@ -2905,4 +2905,4 @@ static void __exit cleanup(void)
 	platform_driver_unregister(&dummy_udc_driver);
 	platform_driver_unregister(&dummy_hcd_driver);
 }
-module_exit(cleanup);
+module_exit(dummy_hcd_cleanup);
drivers/usb/gadget/legacy/inode.c +4 -4
@@ -2101,7 +2101,7 @@ MODULE_ALIAS_FS("gadgetfs");
 
 /*----------------------------------------------------------------------*/
 
-static int __init init (void)
+static int __init gadgetfs_init (void)
 {
 	int status;
 
@@ -2111,12 +2111,12 @@ static int __init init (void)
 			shortname, driver_desc);
 	return status;
 }
-module_init (init);
+module_init (gadgetfs_init);
 
-static void __exit cleanup (void)
+static void __exit gadgetfs_cleanup (void)
 {
 	pr_debug ("unregister %s\n", shortname);
 	unregister_filesystem (&gadgetfs_type);
 }
-module_exit (cleanup);
+module_exit (gadgetfs_cleanup);
 
Signature · 5 lines
~Randy
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#24 lore raw

PATCH 7/9 usb: usbip: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 80fd9cd52de6 ("usbip: vudc: Add VUDC main file")
Cc Krzysztof Opasiak <[email protected]>
Cc Igor Kotrasinski <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Valentina Manea <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Shuah Khan <[email protected]>
---
 drivers/usb/usbip/vudc_main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/usbip/vudc_main.c +4 -4
@@ -28,7 +28,7 @@ static struct platform_driver vudc_drive
 
 static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices);
 
-static int __init init(void)
+static int __init vudc_init(void)
 {
 	int retval = -ENOMEM;
 	int i;
@@ -86,9 +86,9 @@ cleanup:
 out:
 	return retval;
 }
-module_init(init);
+module_init(vudc_init);
 
-static void __exit cleanup(void)
+static void __exit vudc_cleanup(void)
 {
 	struct vudc_device *udc_dev = NULL, *udc_dev2 = NULL;
 
@@ -103,7 +103,7 @@ static void __exit cleanup(void)
 	}
 	platform_driver_unregister(&vudc_driver);
 }
-module_exit(cleanup);
+module_exit(vudc_cleanup);
 
 MODULE_DESCRIPTION("USB over IP Device Controller");
 MODULE_AUTHOR("Krzysztof Opasiak, Karol Kosik, Igor Kotrasinski");
maintainer Acked-by on v1 7/9
#25 lore raw

Re: [PATCH 7/9] usb: usbip: eliminate anonymous module_init & module_exit

Quoted 58 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 80fd9cd52de6 ("usbip: vudc: Add VUDC main file")
Cc Krzysztof Opasiak <[email protected]>
Cc Igor Kotrasinski <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Valentina Manea <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Shuah Khan <[email protected]>
---
  drivers/usb/usbip/vudc_main.c |    8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/usbip/vudc_main.c +3 -3
@@ -28,7 +28,7 @@ static struct platform_driver vudc_drive
 
  static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices);
 
-static int __init init(void)
+static int __init vudc_init(void)
  {
  	int retval = -ENOMEM;
  	int i;
@@ -86,9 +86,9 @@ cleanup:
  out:
  	return retval;
  }
-module_init(init);
+module_init(vudc_init);
 
-static void __exit cleanup(void)
+static void __exit vudc_cleanup(void)
  {
  	struct vudc_device *udc_dev = NULL, *udc_dev2 = NULL;
 

drivers/usb/usbip/vudc_main.c static void __exit cleanup(void) · line 109

Quoted 8 lines
drivers/usb/usbip/vudc_main.c +1 -1
@@ -103,7 +103,7 @@ static void __exit cleanup(void)
  	}
  	platform_driver_unregister(&vudc_driver);
  }
-module_exit(cleanup);
+module_exit(vudc_cleanup);
 
  MODULE_DESCRIPTION("USB over IP Device Controller");
  MODULE_AUTHOR("Krzysztof Opasiak, Karol Kosik, Igor Kotrasinski");

Thanks for fixing this.

thanks,
-- Shuah

#26 lore raw

PATCH 8/9 x86/crypto: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 64b94ceae8c1 ("crypto: blowfish - add x86_64 assembly implementation")
Fixes 676a38046f4f ("crypto: camellia-x86_64 - module init/exit functions should be static")
Fixes 0b95ec56ae19 ("crypto: camellia - add assembler implementation for x86_64")
Fixes 56d76c96a9f3 ("crypto: serpent - add AVX2/x86_64 assembler implementation of serpent cipher")
Fixes b9f535ffe38f ("[CRYPTO] twofish: i586 assembly version")
Fixes ff0a70fe0536 ("crypto: twofish-x86_64-3way - module init/exit functions should be static")
Fixes 8280daad436e ("crypto: twofish - add 3-way parallel x86_64 assembler implemention")
Cc Jussi Kivilinna <[email protected]>
Cc Joachim Fritschi <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "David S. Miller" <[email protected]>
---
 arch/x86/crypto/blowfish_glue.c     |    8 ++++----
 arch/x86/crypto/camellia_glue.c     |    8 ++++----
 arch/x86/crypto/serpent_avx2_glue.c |    8 ++++----
 arch/x86/crypto/twofish_glue.c      |    8 ++++----
 arch/x86/crypto/twofish_glue_3way.c |    8 ++++----
 5 files changed, 20 insertions(+), 20 deletions(-)
arch/x86/crypto/blowfish_glue.c +4 -4
@@ -315,7 +315,7 @@ static int force;
 module_param(force, int, 0);
 MODULE_PARM_DESC(force, "Force module load, ignore CPU blacklist");
 
-static int __init init(void)
+static int __init blowfish_init(void)
 {
 	int err;
 
@@ -339,15 +339,15 @@ static int __init init(void)
 	return err;
 }
 
-static void __exit fini(void)
+static void __exit blowfish_fini(void)
 {
 	crypto_unregister_alg(&bf_cipher_alg);
 	crypto_unregister_skciphers(bf_skcipher_algs,
 				    ARRAY_SIZE(bf_skcipher_algs));
 }
 
-module_init(init);
-module_exit(fini);
+module_init(blowfish_init);
+module_exit(blowfish_fini);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Blowfish Cipher Algorithm, asm optimized");
arch/x86/crypto/camellia_glue.c +4 -4
@@ -1377,7 +1377,7 @@ static int force;
 module_param(force, int, 0);
 MODULE_PARM_DESC(force, "Force module load, ignore CPU blacklist");
 
-static int __init init(void)
+static int __init camellia_init(void)
 {
 	int err;
 
@@ -1401,15 +1401,15 @@ static int __init init(void)
 	return err;
 }
 
-static void __exit fini(void)
+static void __exit camellia_fini(void)
 {
 	crypto_unregister_alg(&camellia_cipher_alg);
 	crypto_unregister_skciphers(camellia_skcipher_algs,
 				    ARRAY_SIZE(camellia_skcipher_algs));
 }
 
-module_init(init);
-module_exit(fini);
+module_init(camellia_init);
+module_exit(camellia_fini);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Camellia Cipher Algorithm, asm optimized");
arch/x86/crypto/serpent_avx2_glue.c +4 -4
@@ -96,7 +96,7 @@ static struct skcipher_alg serpent_algs[
 
 static struct simd_skcipher_alg *serpent_simd_algs[ARRAY_SIZE(serpent_algs)];
 
-static int __init init(void)
+static int __init serpent_avx2_init(void)
 {
 	const char *feature_name;
 
@@ -115,14 +115,14 @@ static int __init init(void)
 					      serpent_simd_algs);
 }
 
-static void __exit fini(void)
+static void __exit serpent_avx2_fini(void)
 {
 	simd_unregister_skciphers(serpent_algs, ARRAY_SIZE(serpent_algs),
 				  serpent_simd_algs);
 }
 
-module_init(init);
-module_exit(fini);
+module_init(serpent_avx2_init);
+module_exit(serpent_avx2_fini);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Serpent Cipher Algorithm, AVX2 optimized");
arch/x86/crypto/twofish_glue.c +4 -4
@@ -81,18 +81,18 @@ static struct crypto_alg alg = {
 	}
 };
 
-static int __init init(void)
+static int __init twofish_glue_init(void)
 {
 	return crypto_register_alg(&alg);
 }
 
-static void __exit fini(void)
+static void __exit twofish_glue_fini(void)
 {
 	crypto_unregister_alg(&alg);
 }
 
-module_init(init);
-module_exit(fini);
+module_init(twofish_glue_init);
+module_exit(twofish_glue_fini);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION ("Twofish Cipher Algorithm, asm optimized");
arch/x86/crypto/twofish_glue_3way.c +4 -4
@@ -140,7 +140,7 @@ static int force;
 module_param(force, int, 0);
 MODULE_PARM_DESC(force, "Force module load, ignore CPU blacklist");
 
-static int __init init(void)
+static int __init twofish_3way_init(void)
 {
 	if (!force && is_blacklisted_cpu()) {
 		printk(KERN_INFO
@@ -154,13 +154,13 @@ static int __init init(void)
 					 ARRAY_SIZE(tf_skciphers));
 }
 
-static void __exit fini(void)
+static void __exit twofish_3way_fini(void)
 {
 	crypto_unregister_skciphers(tf_skciphers, ARRAY_SIZE(tf_skciphers));
 }
 
-module_init(init);
-module_exit(fini);
+module_init(twofish_3way_init);
+module_exit(twofish_3way_fini);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Twofish Cipher Algorithm, 3-way parallel asm optimized");
maintainer
#27 lore raw

Re: [PATCH 8/9] x86/crypto: eliminate anonymous module_init & module_exit

Quoted 34 lines · Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 64b94ceae8c1 ("crypto: blowfish - add x86_64 assembly implementation")
Fixes 676a38046f4f ("crypto: camellia-x86_64 - module init/exit functions should be static")
Fixes 0b95ec56ae19 ("crypto: camellia - add assembler implementation for x86_64")
Fixes 56d76c96a9f3 ("crypto: serpent - add AVX2/x86_64 assembler implementation of serpent cipher")
Fixes b9f535ffe38f ("[CRYPTO] twofish: i586 assembly version")
Fixes ff0a70fe0536 ("crypto: twofish-x86_64-3way - module init/exit functions should be static")
Fixes 8280daad436e ("crypto: twofish - add 3-way parallel x86_64 assembler implemention")
Cc Jussi Kivilinna <[email protected]>
Cc Joachim Fritschi <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "David S. Miller" <[email protected]>
Quoted 7 lines
---
 arch/x86/crypto/blowfish_glue.c     |    8 ++++----
 arch/x86/crypto/camellia_glue.c     |    8 ++++----
 arch/x86/crypto/serpent_avx2_glue.c |    8 ++++----
 arch/x86/crypto/twofish_glue.c      |    8 ++++----
 arch/x86/crypto/twofish_glue_3way.c |    8 ++++----
 5 files changed, 20 insertions(+), 20 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#28 lore raw

PATCH 9/9 testmmiotrace: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Fixes 8b7d89d02ef3 ("x86: mmiotrace - trace memory mapped IO")
Cc Thomas Gleixner <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/mm/testmmiotrace.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/mm/testmmiotrace.c +4 -4
@@ -113,7 +113,7 @@ static void do_test_bulk_ioremapping(voi
 	synchronize_rcu();
 }
 
-static int __init init(void)
+static int __init testmmiotrace_init(void)
 {
 	unsigned long size = (read_far) ? (8 << 20) : (16 << 10);
 	int ret = security_locked_down(LOCKDOWN_MMIOTRACE);
@@ -136,11 +136,11 @@ static int __init init(void)
 	return 0;
 }
 
-static void __exit cleanup(void)
+static void __exit testmmiotrace_cleanup(void)
 {
 	pr_debug("unloaded.\n");
 }
 
-module_init(init);
-module_exit(cleanup);
+module_init(testmmiotrace_init);
+module_exit(testmmiotrace_cleanup);
 MODULE_LICENSE("GPL");
maintainer Acked-by on v1 9/9
#29 lore raw

Re: [PATCH 9/9] testmmiotrace: eliminate anonymous module_init & module_exit

Quoted 20 lines · On Wed, 16 Mar 2022 12:20:10 -0700 Randy Dunlap <[email protected]> wrote:

Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs
calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs
calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs

Quoted 4 lines
Fixes 8b7d89d02ef3 ("x86: mmiotrace - trace memory mapped IO")
Cc Thomas Gleixner <[email protected]>
Cc Steven Rostedt <[email protected]>

-- Steve

Quoted 30 lines
Cc Ingo Molnar <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/mm/testmmiotrace.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/mm/testmmiotrace.c +1 -2
@@ -113,7 +113,7 @@ static void do_test_bulk_ioremapping(voi
 	synchronize_rcu();
 }
 
-static int __init init(void)
+static int __init testmmiotrace_init(void)
 {
 	unsigned long size = (read_far) ? (8 << 20) : (16 << 10);
 	int ret = security_locked_down(LOCKDOWN_MMIOTRACE);
@@ -136,11 +136,11 @@ static int __init init(void)
 	return 0;
 }
 
-static void __exit cleanup(void)

arch/x86/mm/testmmiotrace.c static int __init init(void) · line 146

Quoted 10 lines
arch/x86/mm/testmmiotrace.c +3 -2
+static void __exit testmmiotrace_cleanup(void)
 {
 	pr_debug("unloaded.\n");
 }
 
-module_init(init);
-module_exit(cleanup);
+module_init(testmmiotrace_init);
+module_exit(testmmiotrace_cleanup);
 MODULE_LICENSE("GPL");

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reviewed-by on the v1 series
#30 lore raw
In reply to Randy Dunlap
Quoted 7 lines · Randy Dunlap

There are a number of drivers that use "module_init(init)" and "module_exit(exit)", which are anonymous names and can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

I'm not fully sure about the Fixes tags but I don't see that it hurts anything.

For the series:

Quoted 104 lines

Example 1: (System.map)
ffffffff832fc78c t init
ffffffff832fc79e t init
ffffffff832fc8f8 t init
ffffffff832fca05 t init
ffffffff832fcbd2 t init
ffffffff83328f0e t init
ffffffff8332c5b1 t init
ffffffff8332d9eb t init
ffffffff8332f0aa t init
ffffffff83330e25 t init
ffffffff833317a5 t init
ffffffff8333dd6b t init

Example 2: (initcall_debug log)
calling init+0x0/0x12 @ 1
initcall init+0x0/0x12 returned 0 after 15 usecs calling init+0x0/0x60 @ 1
initcall init+0x0/0x60 returned 0 after 2 usecs calling init+0x0/0x9a @ 1
initcall init+0x0/0x9a returned 0 after 74 usecs calling init+0x0/0x73 @ 1
initcall init+0x0/0x73 returned 0 after 6 usecs calling init+0x0/0x73 @ 1
initcall init+0x0/0x73 returned 0 after 4 usecs calling init+0x0/0xf5 @ 1
initcall init+0x0/0xf5 returned 0 after 27 usecs calling init+0x0/0x7d @ 1
initcall init+0x0/0x7d returned 0 after 11 usecs calling init+0x0/0xc9 @ 1
initcall init+0x0/0xc9 returned 0 after 19 usecs calling init+0x0/0x9d @ 1
initcall init+0x0/0x9d returned 0 after 37 usecs calling init+0x0/0x63f @ 1
initcall init+0x0/0x63f returned 0 after 411 usecs calling init+0x0/0x171 @ 1
initcall init+0x0/0x171 returned 0 after 61 usecs calling init+0x0/0xef @ 1
initcall init+0x0/0xef returned 0 after 3 usecs

Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc Jens Axboe <[email protected]>
Cc Amit Shah <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Eli Cohen <[email protected]>
Cc Saeed Mahameed <[email protected]>
Cc Leon Romanovsky <[email protected]>
Cc Pablo Neira Ayuso <[email protected]>
Cc Jozsef Kadlecsik <[email protected]>
Cc Florian Westphal <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Michał Mirosław <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Krzysztof Opasiak <[email protected]>
Cc Igor Kotrasinski <[email protected]>
Cc Valentina Manea <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Jussi Kivilinna <[email protected]>
Cc Joachim Fritschi <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Karol Herbst <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>

patches:
[PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit [PATCH 3/9] net: mlx5: eliminate anonymous module_init & module_exit [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit [PATCH 7/9] usb: usbip: eliminate anonymous module_init & module_exit [PATCH 8/9] x86/crypto: eliminate anonymous module_init & module_exit [PATCH 9/9] testmmiotrace: eliminate anonymous module_init & module_exit

diffstat:

Quoted 16 lines
 arch/x86/crypto/blowfish_glue.c                |    8 ++++----
 arch/x86/crypto/camellia_glue.c                |    8 ++++----
 arch/x86/crypto/serpent_avx2_glue.c            |    8 ++++----
 arch/x86/crypto/twofish_glue.c                 |    8 ++++----
 arch/x86/crypto/twofish_glue_3way.c            |    8 ++++----
 arch/x86/mm/testmmiotrace.c                    |    8 ++++----
 drivers/block/virtio_blk.c                     |    8 ++++----
 drivers/char/virtio_console.c                  |    8 ++++----
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    8 ++++----
 drivers/scsi/virtio_scsi.c                     |    8 ++++----
 drivers/usb/gadget/legacy/inode.c              |    8 ++++----
 drivers/usb/gadget/legacy/serial.c             |   10 +++++-----
 drivers/usb/gadget/udc/dummy_hcd.c             |    8 ++++----
 drivers/usb/usbip/vudc_main.c                  |    8 ++++----
 net/ipv4/netfilter/nf_nat_h323.c               |    8 ++++----
 15 files changed, 61 insertions(+), 61 deletions(-)

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

maintainer Applied
#31 lore raw

Re: (subset) [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit

In reply to Randy Dunlap
Quoted 9 lines · Randy Dunlap

There are a number of drivers that use "module_init(init)" and "module_exit(exit)", which are anonymous names and can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

[...]

Applied, thanks!

[1/9] virtio_blk: eliminate anonymous module_init & module_exit

      commit: bcfe9b6cbb4438b8c1cc4bd475221652c8f9301b

Best regards,

Signature · 1 line
Jens Axboe
#32 lore raw
In reply to Randy Dunlap
Quoted 9 lines · Randy Dunlap

There are a number of drivers that use "module_init(init)" and "module_exit(exit)", which are anonymous names and can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log.

Give each of these init and exit functions unique driver-specific names to eliminate the anonymous names.

[...]

Applied to 5.18/scsi-fixes, thanks!

[5/9] virtio-scsi: eliminate anonymous module_init & module_exit

      https://git.kernel.org/mkp/scsi/c/41b8c2a31472
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering