linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit
@ 2022-03-16 19:20 Randy Dunlap
  2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
                   ` (10 more replies)
  0 siblings, 11 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Amit Shah <amit@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Eli Cohen <eli@mellanox.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
Cc: Igor Kotrasinski <i.kotrasinsk@samsung.com>
Cc: Valentina Manea <valentina.manea.m@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: Joachim Fritschi <jfritschi@freenet.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Karol Herbst <karolherbst@gmail.com>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Cc: netdev@vger.kernel.org
Cc: linux-block@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Cc: linux-rdma@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: nouveau@lists.freedesktop.org
Cc: virtualization@lists.linux-foundation.org
Cc: x86@kernel.org

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

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

* [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-17  3:26   ` Jason Wang
                     ` (2 more replies)
  2022-03-16 19:20 ` [PATCH 2/9] virtio_console: " Randy Dunlap
                   ` (9 subsequent siblings)
  10 siblings, 3 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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.")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
---
 drivers/block/virtio_blk.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/drivers/block/virtio_blk.c
+++ lnx-517-rc8/drivers/block/virtio_blk.c
@@ -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");

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

* [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
  2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-17 15:47   ` Amit Shah
  2022-03-20 12:04   ` Michael S. Tsirkin
  2022-03-16 19:20 ` [PATCH 3/9] net: mlx5: " Randy Dunlap
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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 <rdunlap@infradead.org>
Cc: Amit Shah <amit@kernel.org>
Cc: virtualization@lists.linux-foundation.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/char/virtio_console.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/drivers/char/virtio_console.c
+++ lnx-517-rc8/drivers/char/virtio_console.c
@@ -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");

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

* [PATCH 3/9] net: mlx5: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
  2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
  2022-03-16 19:20 ` [PATCH 2/9] virtio_console: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-24 18:03   ` Leon Romanovsky
  2022-03-16 19:20 ` [PATCH 4/9] netfilter: h323: " Randy Dunlap
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Eli Cohen <eli@mellanox.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: netdev@vger.kernel.org
Cc: Leon Romanovsky <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ lnx-517-rc8/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -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);

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

* [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (2 preceding siblings ...)
  2022-03-16 19:20 ` [PATCH 3/9] net: mlx5: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-17  3:42   ` Florian Westphal
  2022-03-17 15:49   ` Pablo Neira Ayuso
  2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
                   ` (6 subsequent siblings)
  10 siblings, 2 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org
---
 net/ipv4/netfilter/nf_nat_h323.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/net/ipv4/netfilter/nf_nat_h323.c
+++ lnx-517-rc8/net/ipv4/netfilter/nf_nat_h323.c
@@ -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 <zhaojingmin@users.sourceforge.net>");
 MODULE_DESCRIPTION("H.323 NAT helper");

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

* [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (3 preceding siblings ...)
  2022-03-16 19:20 ` [PATCH 4/9] netfilter: h323: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-17  3:25   ` Jason Wang
                     ` (3 more replies)
  2022-03-16 19:20 ` [PATCH 6/9] usb: gadget: " Randy Dunlap
                   ` (5 subsequent siblings)
  10 siblings, 4 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
---
 drivers/scsi/virtio_scsi.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/drivers/scsi/virtio_scsi.c
+++ lnx-517-rc8/drivers/scsi/virtio_scsi.c
@@ -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");

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

* [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (4 preceding siblings ...)
  2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-17  3:29   ` Ira Weiny
  2022-03-16 19:20 ` [PATCH 7/9] usb: usbip: " Randy Dunlap
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-usb@vger.kernel.org
---
 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(-)

--- lnx-517-rc8.orig/drivers/usb/gadget/legacy/serial.c
+++ lnx-517-rc8/drivers/usb/gadget/legacy/serial.c
@@ -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);
--- lnx-517-rc8.orig/drivers/usb/gadget/udc/dummy_hcd.c
+++ lnx-517-rc8/drivers/usb/gadget/udc/dummy_hcd.c
@@ -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);
--- lnx-517-rc8.orig/drivers/usb/gadget/legacy/inode.c
+++ lnx-517-rc8/drivers/usb/gadget/legacy/inode.c
@@ -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);
 

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

* [PATCH 7/9] usb: usbip: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (5 preceding siblings ...)
  2022-03-16 19:20 ` [PATCH 6/9] usb: gadget: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-18 22:45   ` Shuah Khan
  2022-03-16 19:20 ` [PATCH 8/9] x86/crypto: " Randy Dunlap
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
Cc: Igor Kotrasinski <i.kotrasinsk@samsung.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Valentina Manea <valentina.manea.m@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
---
 drivers/usb/usbip/vudc_main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/drivers/usb/usbip/vudc_main.c
+++ lnx-517-rc8/drivers/usb/usbip/vudc_main.c
@@ -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");

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

* [PATCH 8/9] x86/crypto: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (6 preceding siblings ...)
  2022-03-16 19:20 ` [PATCH 7/9] usb: usbip: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-04-08  8:31   ` Herbert Xu
  2022-03-16 19:20 ` [PATCH 9/9] testmmiotrace: " Randy Dunlap
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: Joachim Fritschi <jfritschi@freenet.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: x86@kernel.org
---
 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(-)

--- lnx-517-rc8.orig/arch/x86/crypto/blowfish_glue.c
+++ lnx-517-rc8/arch/x86/crypto/blowfish_glue.c
@@ -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");
--- lnx-517-rc8.orig/arch/x86/crypto/camellia_glue.c
+++ lnx-517-rc8/arch/x86/crypto/camellia_glue.c
@@ -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");
--- lnx-517-rc8.orig/arch/x86/crypto/serpent_avx2_glue.c
+++ lnx-517-rc8/arch/x86/crypto/serpent_avx2_glue.c
@@ -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");
--- lnx-517-rc8.orig/arch/x86/crypto/twofish_glue.c
+++ lnx-517-rc8/arch/x86/crypto/twofish_glue.c
@@ -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");
--- lnx-517-rc8.orig/arch/x86/crypto/twofish_glue_3way.c
+++ lnx-517-rc8/arch/x86/crypto/twofish_glue_3way.c
@@ -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");

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

* [PATCH 9/9] testmmiotrace: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (7 preceding siblings ...)
  2022-03-16 19:20 ` [PATCH 8/9] x86/crypto: " Randy Dunlap
@ 2022-03-16 19:20 ` Randy Dunlap
  2022-03-17  2:38   ` Steven Rostedt
  2022-03-17  3:32 ` [PATCH 0/9] treewide: " Ira Weiny
  2022-03-17 16:11 ` (subset) " Jens Axboe
  10 siblings, 1 reply; 31+ messages in thread
From: Randy Dunlap @ 2022-03-16 19:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Karol Herbst <karolherbst@gmail.com>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: nouveau@lists.freedesktop.org
Cc: x86@kernel.org
---
 arch/x86/mm/testmmiotrace.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- lnx-517-rc8.orig/arch/x86/mm/testmmiotrace.c
+++ lnx-517-rc8/arch/x86/mm/testmmiotrace.c
@@ -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");

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

* Re: [PATCH 9/9] testmmiotrace: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 9/9] testmmiotrace: " Randy Dunlap
@ 2022-03-17  2:38   ` Steven Rostedt
  0 siblings, 0 replies; 31+ messages in thread
From: Steven Rostedt @ 2022-03-17  2:38 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Ingo Molnar,
	Karol Herbst, Pekka Paalanen, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Borislav Petkov, H. Peter Anvin, netfilter-devel,
	coreteam, netdev, linux-block, linux-crypto, linux-rdma,
	linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, 16 Mar 2022 12:20:10 -0700
Randy Dunlap <rdunlap@infradead.org> 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
> 
> Fixes: 8b7d89d02ef3 ("x86: mmiotrace - trace memory mapped IO")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Steven Rostedt <rostedt@goodmis.org>

Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve

> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Karol Herbst <karolherbst@gmail.com>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: nouveau@lists.freedesktop.org
> Cc: x86@kernel.org
> ---
>  arch/x86/mm/testmmiotrace.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/arch/x86/mm/testmmiotrace.c
> +++ lnx-517-rc8/arch/x86/mm/testmmiotrace.c
> @@ -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");


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

* Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
@ 2022-03-17  3:25   ` Jason Wang
  2022-03-17  8:46   ` Stefan Hajnoczi
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 31+ messages in thread
From: Jason Wang @ 2022-03-17  3:25 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	RDMA mailing list, linux-scsi, linux-usb, nouveau,
	virtualization, the arch/x86 maintainers

On Thu, Mar 17, 2022 at 3:24 AM Randy Dunlap <rdunlap@infradead.org> 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
>
> Fixes: 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: linux-scsi@vger.kernel.org
> Cc: virtualization@lists.linux-foundation.org

Acked-by: Jason Wang <jasowang@redhat.com>

> ---
>  drivers/scsi/virtio_scsi.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> --- lnx-517-rc8.orig/drivers/scsi/virtio_scsi.c
> +++ lnx-517-rc8/drivers/scsi/virtio_scsi.c
> @@ -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");
>


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

* Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
@ 2022-03-17  3:26   ` Jason Wang
  2022-03-17  8:45   ` Stefan Hajnoczi
  2022-03-20 12:04   ` Michael S. Tsirkin
  2 siblings, 0 replies; 31+ messages in thread
From: Jason Wang @ 2022-03-17  3:26 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	RDMA mailing list, linux-scsi, linux-usb, nouveau,
	virtualization, the arch/x86 maintainers

On Thu, Mar 17, 2022 at 3:25 AM Randy Dunlap <rdunlap@infradead.org> 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
>
> Fixes: e467cde23818 ("Block driver using virtio.")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: virtualization@lists.linux-foundation.org
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-block@vger.kernel.org
> ---

Acked-by: Jason Wang <jasowang@redhat.com>

>  drivers/block/virtio_blk.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> --- lnx-517-rc8.orig/drivers/block/virtio_blk.c
> +++ lnx-517-rc8/drivers/block/virtio_blk.c
> @@ -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");
>


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

* Re: [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 6/9] usb: gadget: " Randy Dunlap
@ 2022-03-17  3:29   ` Ira Weiny
  2022-03-17  4:59     ` Randy Dunlap
  0 siblings, 1 reply; 31+ messages in thread
From: Ira Weiny @ 2022-03-17  3:29 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:07PM -0700, Randy Dunlap 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
> 
> 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:

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: linux-usb@vger.kernel.org
> ---
>  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(-)
> 
> --- lnx-517-rc8.orig/drivers/usb/gadget/legacy/serial.c
> +++ lnx-517-rc8/drivers/usb/gadget/legacy/serial.c
> @@ -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);
> --- lnx-517-rc8.orig/drivers/usb/gadget/udc/dummy_hcd.c
> +++ lnx-517-rc8/drivers/usb/gadget/udc/dummy_hcd.c
> @@ -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);
> --- lnx-517-rc8.orig/drivers/usb/gadget/legacy/inode.c
> +++ lnx-517-rc8/drivers/usb/gadget/legacy/inode.c
> @@ -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);
>  

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

* Re: [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (8 preceding siblings ...)
  2022-03-16 19:20 ` [PATCH 9/9] testmmiotrace: " Randy Dunlap
@ 2022-03-17  3:32 ` Ira Weiny
  2022-03-17 16:11 ` (subset) " Jens Axboe
  10 siblings, 0 replies; 31+ messages in thread
From: Ira Weiny @ 2022-03-17  3:32 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:01PM -0700, Randy Dunlap wrote:
> 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:

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> 
> 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" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Amit Shah <amit@kernel.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Eli Cohen <eli@mellanox.com>
> Cc: Saeed Mahameed <saeedm@nvidia.com>
> Cc: Leon Romanovsky <leon@kernel.org>
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
> Cc: Florian Westphal <fw@strlen.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
> Cc: Igor Kotrasinski <i.kotrasinsk@samsung.com>
> Cc: Valentina Manea <valentina.manea.m@gmail.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> Cc: Joachim Fritschi <jfritschi@freenet.de>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Karol Herbst <karolherbst@gmail.com>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: netfilter-devel@vger.kernel.org
> Cc: coreteam@netfilter.org
> Cc: netdev@vger.kernel.org
> Cc: linux-block@vger.kernel.org
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-rdma@vger.kernel.org
> Cc: linux-scsi@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: nouveau@lists.freedesktop.org
> Cc: virtualization@lists.linux-foundation.org
> Cc: x86@kernel.org
> 
> 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(-)

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

* Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 4/9] netfilter: h323: " Randy Dunlap
@ 2022-03-17  3:42   ` Florian Westphal
  2022-03-17 15:49   ` Pablo Neira Ayuso
  1 sibling, 0 replies; 31+ messages in thread
From: Florian Westphal @ 2022-03-17  3:42 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

Randy Dunlap <rdunlap@infradead.org> 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
> 
> Fixes: f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Acked-by: Florian Westphal <fw@strlen.de>

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

* Re: [PATCH 6/9] usb: gadget: eliminate anonymous module_init & module_exit
  2022-03-17  3:29   ` Ira Weiny
@ 2022-03-17  4:59     ` Randy Dunlap
  0 siblings, 0 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-17  4:59 UTC (permalink / raw)
  To: Ira Weiny
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86,
	Felipe Balbi



On 3/16/22 20:29, Ira Weiny wrote:
> On Wed, Mar 16, 2022 at 12:20:07PM -0700, Randy Dunlap 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
>>
>> 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.}

> Regardless:
> 
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>

Thanks.

> 
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
>> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> Cc: linux-usb@vger.kernel.org
>> ---
>>  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(-)
>>
>> --- lnx-517-rc8.orig/drivers/usb/gadget/legacy/serial.c
>> +++ lnx-517-rc8/drivers/usb/gadget/legacy/serial.c
>> @@ -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);
>> --- lnx-517-rc8.orig/drivers/usb/gadget/udc/dummy_hcd.c
>> +++ lnx-517-rc8/drivers/usb/gadget/udc/dummy_hcd.c
>> @@ -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);
>> --- lnx-517-rc8.orig/drivers/usb/gadget/legacy/inode.c
>> +++ lnx-517-rc8/drivers/usb/gadget/legacy/inode.c
>> @@ -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);
>>  

-- 
~Randy

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

* Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
  2022-03-17  3:26   ` Jason Wang
@ 2022-03-17  8:45   ` Stefan Hajnoczi
  2022-03-20 12:04   ` Michael S. Tsirkin
  2 siblings, 0 replies; 31+ messages in thread
From: Stefan Hajnoczi @ 2022-03-17  8:45 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

On Wed, Mar 16, 2022 at 12:20:02PM -0700, Randy Dunlap 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
> 
> Fixes: e467cde23818 ("Block driver using virtio.")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: virtualization@lists.linux-foundation.org
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-block@vger.kernel.org
> ---
>  drivers/block/virtio_blk.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/drivers/block/virtio_blk.c
> +++ lnx-517-rc8/drivers/block/virtio_blk.c
> @@ -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");
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
  2022-03-17  3:25   ` Jason Wang
@ 2022-03-17  8:46   ` Stefan Hajnoczi
  2022-03-20 12:04   ` Michael S. Tsirkin
  2022-03-30  3:51   ` Martin K. Petersen
  3 siblings, 0 replies; 31+ messages in thread
From: Stefan Hajnoczi @ 2022-03-17  8:46 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

[-- Attachment #1: Type: text/plain, Size: 2263 bytes --]

On Wed, Mar 16, 2022 at 12:20:06PM -0700, Randy Dunlap 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
> 
> Fixes: 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: linux-scsi@vger.kernel.org
> Cc: virtualization@lists.linux-foundation.org
> ---
>  drivers/scsi/virtio_scsi.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/drivers/scsi/virtio_scsi.c
> +++ lnx-517-rc8/drivers/scsi/virtio_scsi.c
> @@ -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");
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 2/9] virtio_console: " Randy Dunlap
@ 2022-03-17 15:47   ` Amit Shah
  2022-03-17 20:40     ` Randy Dunlap
  2022-03-20 12:04   ` Michael S. Tsirkin
  1 sibling, 1 reply; 31+ messages in thread
From: Amit Shah @ 2022-03-17 15:47 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Michael S. Tsirkin, Jason Wang, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, 2022-03-16 at 12:20 -0700, Randy Dunlap 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
> 
> Fixes: 31610434bc35 ("Virtio console driver")
> Fixes: 7177876fea83 ("virtio: console: Add ability to remove module")
> Signed-off-by: Randy Dunlap <
> rdunlap@infradead.org
> >
> Cc: Amit Shah <
> amit@kernel.org
> >
> Cc: 
> virtualization@lists.linux-foundation.org
> 
> Cc: Arnd Bergmann <
> arnd@arndb.de
> >
> Cc: Greg Kroah-Hartman <
> gregkh@linuxfoundation.org
> >
> ---
>  drivers/char/virtio_console.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Amit Shah <amit@kernel.org>

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


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

* Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 4/9] netfilter: h323: " Randy Dunlap
  2022-03-17  3:42   ` Florian Westphal
@ 2022-03-17 15:49   ` Pablo Neira Ayuso
  2022-03-17 20:42     ` Randy Dunlap
  1 sibling, 1 reply; 31+ messages in thread
From: Pablo Neira Ayuso @ 2022-03-17 15:49 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:05PM -0700, Randy Dunlap 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

LGTM.

Should I route this through the netfilter tree?

> Fixes: f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
> Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
> Cc: Florian Westphal <fw@strlen.de>
> Cc: netfilter-devel@vger.kernel.org
> Cc: coreteam@netfilter.org
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: netdev@vger.kernel.org
> ---
>  net/ipv4/netfilter/nf_nat_h323.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/net/ipv4/netfilter/nf_nat_h323.c
> +++ lnx-517-rc8/net/ipv4/netfilter/nf_nat_h323.c
> @@ -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 <zhaojingmin@users.sourceforge.net>");
>  MODULE_DESCRIPTION("H.323 NAT helper");

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

* Re: (subset) [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
                   ` (9 preceding siblings ...)
  2022-03-17  3:32 ` [PATCH 0/9] treewide: " Ira Weiny
@ 2022-03-17 16:11 ` Jens Axboe
  10 siblings, 0 replies; 31+ messages in thread
From: Jens Axboe @ 2022-03-17 16:11 UTC (permalink / raw)
  To: linux-kernel, Randy Dunlap
  Cc: Arnd Bergmann, linux-scsi, Greg Kroah-Hartman, Igor Kotrasinski,
	Valentina Manea, Florian Westphal, Peter Zijlstra, Karol Herbst,
	Eli Cohen, Pekka Paalanen, Herbert Xu, James E.J. Bottomley, x86,
	netfilter-devel, Jozsef Kadlecsik, Shuah Khan, Ingo Molnar,
	Amit Shah, H. Peter Anvin, Martin K. Petersen, David S. Miller,
	Andy Lutomirski, Shuah Khan, Sebastian Andrzej Siewior,
	linux-block, Saeed Mahameed, linux-usb, coreteam,
	Michael S. Tsirkin, Borislav Petkov, Krzysztof Opasiak, netdev,
	linux-crypto, Thomas Gleixner, Stefan Hajnoczi, Paolo Bonzini,
	nouveau, Jason Wang, Steven Rostedt, Michał Mirosław,
	Felipe Balbi, Dave Hansen, virtualization, Leon Romanovsky,
	Jussi Kivilinna, linux-rdma, Pablo Neira Ayuso, Jakub Kicinski,
	Joachim Fritschi

On Wed, 16 Mar 2022 12:20:01 -0700, Randy Dunlap wrote:
> 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,
-- 
Jens Axboe



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

* Re: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit
  2022-03-17 15:47   ` Amit Shah
@ 2022-03-17 20:40     ` Randy Dunlap
  0 siblings, 0 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-17 20:40 UTC (permalink / raw)
  To: Amit Shah, linux-kernel
  Cc: Michael S. Tsirkin, Jason Wang, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86



On 3/17/22 08:47, Amit Shah wrote:
> On Wed, 2022-03-16 at 12:20 -0700, Randy Dunlap 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
>>
>> Fixes: 31610434bc35 ("Virtio console driver")
>> Fixes: 7177876fea83 ("virtio: console: Add ability to remove module")
>> Signed-off-by: Randy Dunlap <
>> rdunlap@infradead.org
>>>
>> Cc: Amit Shah <
>> amit@kernel.org
>>>
>> Cc: 
>> virtualization@lists.linux-foundation.org
>>
>> Cc: Arnd Bergmann <
>> arnd@arndb.de
>>>
>> Cc: Greg Kroah-Hartman <
>> gregkh@linuxfoundation.org
>>>
>> ---
>>  drivers/char/virtio_console.c |    8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> Reviewed-by: Amit Shah <amit@kernel.org>
> 
> 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.

-- 
~Randy

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

* Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit
  2022-03-17 15:49   ` Pablo Neira Ayuso
@ 2022-03-17 20:42     ` Randy Dunlap
  0 siblings, 0 replies; 31+ messages in thread
From: Randy Dunlap @ 2022-03-17 20:42 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86



On 3/17/22 08:49, Pablo Neira Ayuso wrote:
> On Wed, Mar 16, 2022 at 12:20:05PM -0700, Randy Dunlap 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
> 
> LGTM.
> 
> Should I route this through the netfilter tree?

Yes, please.
Thanks.

> 
>> Fixes: f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Pablo Neira Ayuso <pablo@netfilter.org>
>> Cc: Jozsef Kadlecsik <kadlec@netfilter.org>
>> Cc: Florian Westphal <fw@strlen.de>
>> Cc: netfilter-devel@vger.kernel.org
>> Cc: coreteam@netfilter.org
>> Cc: "David S. Miller" <davem@davemloft.net>
>> Cc: Jakub Kicinski <kuba@kernel.org>
>> Cc: netdev@vger.kernel.org
>> ---
>>  net/ipv4/netfilter/nf_nat_h323.c |    8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> --- lnx-517-rc8.orig/net/ipv4/netfilter/nf_nat_h323.c
>> +++ lnx-517-rc8/net/ipv4/netfilter/nf_nat_h323.c
>> @@ -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 <zhaojingmin@users.sourceforge.net>");
>>  MODULE_DESCRIPTION("H.323 NAT helper");

-- 
~Randy

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

* Re: [PATCH 7/9] usb: usbip: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 7/9] usb: usbip: " Randy Dunlap
@ 2022-03-18 22:45   ` Shuah Khan
  0 siblings, 0 replies; 31+ messages in thread
From: Shuah Khan @ 2022-03-18 22:45 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Michael S. Tsirkin, Jason Wang, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Jussi Kivilinna, Joachim Fritschi,
	Herbert Xu, Thomas Gleixner, Steven Rostedt, Ingo Molnar,
	Karol Herbst, Pekka Paalanen, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Borislav Petkov, H. Peter Anvin, netfilter-devel,
	coreteam, netdev, linux-block, linux-crypto, linux-rdma,
	linux-scsi, linux-usb, nouveau, virtualization, x86, Shuah Khan

On 3/16/22 1:20 PM, Randy Dunlap 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
> 
> Fixes: 80fd9cd52de6 ("usbip: vudc: Add VUDC main file")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
> Cc: Igor Kotrasinski <i.kotrasinsk@samsung.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Valentina Manea <valentina.manea.m@gmail.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> ---
>   drivers/usb/usbip/vudc_main.c |    8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/drivers/usb/usbip/vudc_main.c
> +++ lnx-517-rc8/drivers/usb/usbip/vudc_main.c
> @@ -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");
> 

Thanks for fixing this.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

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

* Re: [PATCH 1/9] virtio_blk: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
  2022-03-17  3:26   ` Jason Wang
  2022-03-17  8:45   ` Stefan Hajnoczi
@ 2022-03-20 12:04   ` Michael S. Tsirkin
  2 siblings, 0 replies; 31+ messages in thread
From: Michael S. Tsirkin @ 2022-03-20 12:04 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jason Wang, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:02PM -0700, Randy Dunlap 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
> 
> Fixes: e467cde23818 ("Block driver using virtio.")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: virtualization@lists.linux-foundation.org
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-block@vger.kernel.org


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

Acked-by: Michael S. Tsirkin <mst@redhat.com>

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

> ---
>  drivers/block/virtio_blk.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/drivers/block/virtio_blk.c
> +++ lnx-517-rc8/drivers/block/virtio_blk.c
> @@ -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");


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

* Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
  2022-03-17  3:25   ` Jason Wang
  2022-03-17  8:46   ` Stefan Hajnoczi
@ 2022-03-20 12:04   ` Michael S. Tsirkin
  2022-03-30  3:51   ` Martin K. Petersen
  3 siblings, 0 replies; 31+ messages in thread
From: Michael S. Tsirkin @ 2022-03-20 12:04 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jason Wang, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:06PM -0700, Randy Dunlap 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
> 
> Fixes: 4fe74b1cb051 ("[SCSI] virtio-scsi: SCSI driver for QEMU based virtual machines")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: linux-scsi@vger.kernel.org
> Cc: virtualization@lists.linux-foundation.org



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

Acked-by: Michael S. Tsirkin <mst@redhat.com>

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


> ---
>  drivers/scsi/virtio_scsi.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/drivers/scsi/virtio_scsi.c
> +++ lnx-517-rc8/drivers/scsi/virtio_scsi.c
> @@ -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");


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

* Re: [PATCH 2/9] virtio_console: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 2/9] virtio_console: " Randy Dunlap
  2022-03-17 15:47   ` Amit Shah
@ 2022-03-20 12:04   ` Michael S. Tsirkin
  1 sibling, 0 replies; 31+ messages in thread
From: Michael S. Tsirkin @ 2022-03-20 12:04 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jason Wang, Paolo Bonzini, Stefan Hajnoczi,
	Jens Axboe, Amit Shah, Arnd Bergmann, Greg Kroah-Hartman,
	Eli Cohen, Saeed Mahameed, Leon Romanovsky, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:03PM -0700, Randy Dunlap 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
> 
> Fixes: 31610434bc35 ("Virtio console driver")
> Fixes: 7177876fea83 ("virtio: console: Add ability to remove module")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Amit Shah <amit@kernel.org>
> Cc: virtualization@lists.linux-foundation.org
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


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

Acked-by: Michael S. Tsirkin <mst@redhat.com>

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


> ---
>  drivers/char/virtio_console.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- lnx-517-rc8.orig/drivers/char/virtio_console.c
> +++ lnx-517-rc8/drivers/char/virtio_console.c
> @@ -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");


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

* Re: [PATCH 3/9] net: mlx5: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 3/9] net: mlx5: " Randy Dunlap
@ 2022-03-24 18:03   ` Leon Romanovsky
  0 siblings, 0 replies; 31+ messages in thread
From: Leon Romanovsky @ 2022-03-24 18:03 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Pablo Neira Ayuso,
	Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Jakub Kicinski, James E.J. Bottomley, Martin K. Petersen,
	Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:04PM -0700, Randy Dunlap 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
> 
> Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Eli Cohen <eli@mellanox.com>
> Cc: Saeed Mahameed <saeedm@nvidia.com>
> Cc: netdev@vger.kernel.org
> Cc: Leon Romanovsky <leon@kernel.org>
> Cc: linux-rdma@vger.kernel.org
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/main.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

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

* Re: [PATCH 5/9] virtio-scsi: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
                     ` (2 preceding siblings ...)
  2022-03-20 12:04   ` Michael S. Tsirkin
@ 2022-03-30  3:51   ` Martin K. Petersen
  3 siblings, 0 replies; 31+ messages in thread
From: Martin K. Petersen @ 2022-03-30  3:51 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Herbert Xu, Thomas Gleixner, Steven Rostedt,
	Ingo Molnar, Karol Herbst, Pekka Paalanen, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Borislav Petkov, H. Peter Anvin,
	netfilter-devel, coreteam, netdev, linux-block, linux-crypto,
	linux-rdma, linux-scsi, linux-usb, nouveau, virtualization, x86


Randy,

> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH 8/9] x86/crypto: eliminate anonymous module_init & module_exit
  2022-03-16 19:20 ` [PATCH 8/9] x86/crypto: " Randy Dunlap
@ 2022-04-08  8:31   ` Herbert Xu
  0 siblings, 0 replies; 31+ messages in thread
From: Herbert Xu @ 2022-04-08  8:31 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
	Stefan Hajnoczi, Jens Axboe, Amit Shah, Arnd Bergmann,
	Greg Kroah-Hartman, Eli Cohen, Saeed Mahameed, Leon Romanovsky,
	Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Jakub Kicinski, James E.J. Bottomley,
	Martin K. Petersen, Felipe Balbi, Michał Mirosław,
	Sebastian Andrzej Siewior, Krzysztof Opasiak, Igor Kotrasinski,
	Valentina Manea, Shuah Khan, Shuah Khan, Jussi Kivilinna,
	Joachim Fritschi, Thomas Gleixner, Steven Rostedt, Ingo Molnar,
	Karol Herbst, Pekka Paalanen, Dave Hansen, Andy Lutomirski,
	Peter Zijlstra, Borislav Petkov, H. Peter Anvin, netfilter-devel,
	coreteam, netdev, linux-block, linux-crypto, linux-rdma,
	linux-scsi, linux-usb, nouveau, virtualization, x86

On Wed, Mar 16, 2022 at 12:20:09PM -0700, Randy Dunlap 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
> 
> 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")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> Cc: Joachim Fritschi <jfritschi@freenet.de>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: x86@kernel.org
> ---
>  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.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2022-04-08  8:33 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 19:20 [PATCH 0/9] treewide: eliminate anonymous module_init & module_exit Randy Dunlap
2022-03-16 19:20 ` [PATCH 1/9] virtio_blk: " Randy Dunlap
2022-03-17  3:26   ` Jason Wang
2022-03-17  8:45   ` Stefan Hajnoczi
2022-03-20 12:04   ` Michael S. Tsirkin
2022-03-16 19:20 ` [PATCH 2/9] virtio_console: " Randy Dunlap
2022-03-17 15:47   ` Amit Shah
2022-03-17 20:40     ` Randy Dunlap
2022-03-20 12:04   ` Michael S. Tsirkin
2022-03-16 19:20 ` [PATCH 3/9] net: mlx5: " Randy Dunlap
2022-03-24 18:03   ` Leon Romanovsky
2022-03-16 19:20 ` [PATCH 4/9] netfilter: h323: " Randy Dunlap
2022-03-17  3:42   ` Florian Westphal
2022-03-17 15:49   ` Pablo Neira Ayuso
2022-03-17 20:42     ` Randy Dunlap
2022-03-16 19:20 ` [PATCH 5/9] virtio-scsi: " Randy Dunlap
2022-03-17  3:25   ` Jason Wang
2022-03-17  8:46   ` Stefan Hajnoczi
2022-03-20 12:04   ` Michael S. Tsirkin
2022-03-30  3:51   ` Martin K. Petersen
2022-03-16 19:20 ` [PATCH 6/9] usb: gadget: " Randy Dunlap
2022-03-17  3:29   ` Ira Weiny
2022-03-17  4:59     ` Randy Dunlap
2022-03-16 19:20 ` [PATCH 7/9] usb: usbip: " Randy Dunlap
2022-03-18 22:45   ` Shuah Khan
2022-03-16 19:20 ` [PATCH 8/9] x86/crypto: " Randy Dunlap
2022-04-08  8:31   ` Herbert Xu
2022-03-16 19:20 ` [PATCH 9/9] testmmiotrace: " Randy Dunlap
2022-03-17  2:38   ` Steven Rostedt
2022-03-17  3:32 ` [PATCH 0/9] treewide: " Ira Weiny
2022-03-17 16:11 ` (subset) " Jens Axboe

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