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

Randy Dunlap
Wed, 16 Mar 2022 19:20:04 -0000

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB
adapters")
Signed-off-by: Randy Dunlap <rdunlap at infradead.org>
Cc: Eli Cohen <eli at mellanox.com>
Cc: Saeed Mahameed <saeedm at nvidia.com>
Cc: netdev at vger.kernel.org
Cc: Leon Romanovsky <leon at kernel.org>
Cc: linux-rdma at 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);