public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: remove unnecessary module_init/exit functions
@ 2026-01-31  0:42 Ethan Nelson-Moore
  2026-01-31 15:11 ` Marc Kleine-Budde
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Ethan Nelson-Moore @ 2026-01-31  0:42 UTC (permalink / raw)
  To: netdev, linux-can, linux-wireless
  Cc: Ethan Nelson-Moore, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Marc Kleine-Budde, Vincent Mailhol, Ido Schimmel, Petr Machata,
	Sridhar Samudrala, Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

Many network drivers have unnecessary empty module_init and module_exit
functions. Remove them (including some that just print a message). Note
that if a module_init function exists, a module_exit function must also
exist; otherwise, the module cannot be unloaded.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
 drivers/net/arcnet/com20020.c                 | 16 ----------
 drivers/net/can/sja1000/sja1000.c             | 16 ----------
 drivers/net/ethernet/8390/8390.c              | 14 ---------
 drivers/net/ethernet/8390/8390p.c             | 11 -------
 drivers/net/ethernet/mellanox/mlxsw/pci.c     | 12 --------
 drivers/net/hamradio/hdlcdrv.c                | 20 -------------
 drivers/net/net_failover.c                    | 13 ---------
 drivers/net/wireless/ath/ath9k/common.c       | 12 --------
 .../realtek/rtlwifi/btcoexist/rtl_btc.c       | 13 ---------
 drivers/net/wireless/rsi/rsi_91x_main.c       | 29 -------------------
 10 files changed, 156 deletions(-)

diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c
index a0053e3992a3..b8526805ffac 100644
--- a/drivers/net/arcnet/com20020.c
+++ b/drivers/net/arcnet/com20020.c
@@ -401,19 +401,3 @@ EXPORT_SYMBOL(com20020_netdev_ops);
 
 MODULE_DESCRIPTION("ARCnet COM20020 chipset core driver");
 MODULE_LICENSE("GPL");
-
-#ifdef MODULE
-
-static int __init com20020_module_init(void)
-{
-	if (BUGLVL(D_NORMAL))
-		pr_info("%s\n", "COM20020 chipset support (by David Woodhouse et al.)");
-	return 0;
-}
-
-static void __exit com20020_module_exit(void)
-{
-}
-module_init(com20020_module_init);
-module_exit(com20020_module_exit);
-#endif				/* MODULE */
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index a8fa0d6516b9..7c5aa8d399d4 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -725,19 +725,3 @@ void unregister_sja1000dev(struct net_device *dev)
 	unregister_candev(dev);
 }
 EXPORT_SYMBOL_GPL(unregister_sja1000dev);
-
-static __init int sja1000_init(void)
-{
-	printk(KERN_INFO "%s CAN netdevice driver\n", DRV_NAME);
-
-	return 0;
-}
-
-module_init(sja1000_init);
-
-static __exit void sja1000_exit(void)
-{
-	printk(KERN_INFO "%s: driver removed\n", DRV_NAME);
-}
-
-module_exit(sja1000_exit);
diff --git a/drivers/net/ethernet/8390/8390.c b/drivers/net/ethernet/8390/8390.c
index c5636245f1ca..8e4354568f04 100644
--- a/drivers/net/ethernet/8390/8390.c
+++ b/drivers/net/ethernet/8390/8390.c
@@ -86,19 +86,5 @@ void NS8390_init(struct net_device *dev, int startp)
 }
 EXPORT_SYMBOL(NS8390_init);
 
-#if defined(MODULE)
-
-static int __init ns8390_module_init(void)
-{
-	return 0;
-}
-
-static void __exit ns8390_module_exit(void)
-{
-}
-
-module_init(ns8390_module_init);
-module_exit(ns8390_module_exit);
-#endif /* MODULE */
 MODULE_DESCRIPTION("National Semiconductor 8390 core driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/net/ethernet/8390/8390p.c b/drivers/net/ethernet/8390/8390p.c
index 6d429b11e9c6..a0bfc8e34f79 100644
--- a/drivers/net/ethernet/8390/8390p.c
+++ b/drivers/net/ethernet/8390/8390p.c
@@ -91,16 +91,5 @@ void NS8390p_init(struct net_device *dev, int startp)
 }
 EXPORT_SYMBOL(NS8390p_init);
 
-static int __init NS8390p_init_module(void)
-{
-	return 0;
-}
-
-static void __exit NS8390p_cleanup_module(void)
-{
-}
-
-module_init(NS8390p_init_module);
-module_exit(NS8390p_cleanup_module);
 MODULE_DESCRIPTION("National Semiconductor 8390 core for ISA driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c
index 8769cba2c746..7da9ef254b72 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c
@@ -2542,18 +2542,6 @@ void mlxsw_pci_driver_unregister(struct pci_driver *pci_driver)
 }
 EXPORT_SYMBOL(mlxsw_pci_driver_unregister);
 
-static int __init mlxsw_pci_module_init(void)
-{
-	return 0;
-}
-
-static void __exit mlxsw_pci_module_exit(void)
-{
-}
-
-module_init(mlxsw_pci_module_init);
-module_exit(mlxsw_pci_module_exit);
-
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Jiri Pirko <jiri@mellanox.com>");
 MODULE_DESCRIPTION("Mellanox switch PCI interface driver");
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index 2263029d1a20..3b88e465d08f 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -742,26 +742,6 @@ EXPORT_SYMBOL(hdlcdrv_unregister);
 
 /* --------------------------------------------------------------------- */
 
-static int __init hdlcdrv_init_driver(void)
-{
-	printk(KERN_INFO "hdlcdrv: (C) 1996-2000 Thomas Sailer HB9JNX/AE4WA\n");
-	printk(KERN_INFO "hdlcdrv: version 0.8\n");
-	return 0;
-}
-
-/* --------------------------------------------------------------------- */
-
-static void __exit hdlcdrv_cleanup_driver(void)
-{
-	printk(KERN_INFO "hdlcdrv: cleanup\n");
-}
-
-/* --------------------------------------------------------------------- */
-
 MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
 MODULE_DESCRIPTION("Packet Radio network interface HDLC encoder/decoder");
 MODULE_LICENSE("GPL");
-module_init(hdlcdrv_init_driver);
-module_exit(hdlcdrv_cleanup_driver);
-
-/* --------------------------------------------------------------------- */
diff --git a/drivers/net/net_failover.c b/drivers/net/net_failover.c
index 5b50d9186f12..d0361aaf25ef 100644
--- a/drivers/net/net_failover.c
+++ b/drivers/net/net_failover.c
@@ -819,18 +819,5 @@ void net_failover_destroy(struct failover *failover)
 }
 EXPORT_SYMBOL_GPL(net_failover_destroy);
 
-static __init int
-net_failover_init(void)
-{
-	return 0;
-}
-module_init(net_failover_init);
-
-static __exit
-void net_failover_exit(void)
-{
-}
-module_exit(net_failover_exit);
-
 MODULE_DESCRIPTION("Failover driver for Paravirtual drivers");
 MODULE_LICENSE("GPL v2");
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c
index ffcf2276eb92..f55b3afb3777 100644
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -403,15 +403,3 @@ void ath9k_cmn_init_crypto(struct ath_hw *ah)
 		ath_hw_keyreset(common, (u16) i);
 }
 EXPORT_SYMBOL(ath9k_cmn_init_crypto);
-
-static int __init ath9k_cmn_init(void)
-{
-	return 0;
-}
-module_init(ath9k_cmn_init);
-
-static void __exit ath9k_cmn_exit(void)
-{
-	return;
-}
-module_exit(ath9k_cmn_exit);
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
index 4641999f3fe9..e88d92d3ae7a 100644
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
@@ -519,16 +519,3 @@ MODULE_AUTHOR("Realtek WlanFAE	<wlanfae@realtek.com>");
 MODULE_AUTHOR("Larry Finger	<Larry.FInger@lwfinger.net>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek 802.11n PCI wireless core");
-
-static int __init rtl_btcoexist_module_init(void)
-{
-	return 0;
-}
-
-static void __exit rtl_btcoexist_module_exit(void)
-{
-	return;
-}
-
-module_init(rtl_btcoexist_module_init);
-module_exit(rtl_btcoexist_module_exit);
diff --git a/drivers/net/wireless/rsi/rsi_91x_main.c b/drivers/net/wireless/rsi/rsi_91x_main.c
index 2112d8d277a9..a9bb37d5d581 100644
--- a/drivers/net/wireless/rsi/rsi_91x_main.c
+++ b/drivers/net/wireless/rsi/rsi_91x_main.c
@@ -425,35 +425,6 @@ void rsi_91x_deinit(struct rsi_hw *adapter)
 }
 EXPORT_SYMBOL_GPL(rsi_91x_deinit);
 
-/**
- * rsi_91x_hal_module_init() - This function is invoked when the module is
- *			       loaded into the kernel.
- *			       It registers the client driver.
- * @void: Void.
- *
- * Return: 0 on success, -1 on failure.
- */
-static int rsi_91x_hal_module_init(void)
-{
-	rsi_dbg(INIT_ZONE, "%s: Module init called\n", __func__);
-	return 0;
-}
-
-/**
- * rsi_91x_hal_module_exit() - This function is called at the time of
- *			       removing/unloading the module.
- *			       It unregisters the client driver.
- * @void: Void.
- *
- * Return: None.
- */
-static void rsi_91x_hal_module_exit(void)
-{
-	rsi_dbg(INIT_ZONE, "%s: Module exit called\n", __func__);
-}
-
-module_init(rsi_91x_hal_module_init);
-module_exit(rsi_91x_hal_module_exit);
 MODULE_AUTHOR("Redpine Signals Inc");
 MODULE_DESCRIPTION("Station driver for RSI 91x devices");
 MODULE_VERSION("0.1");
-- 
2.43.0


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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
@ 2026-01-31 15:11 ` Marc Kleine-Budde
  2026-01-31 21:30 ` Michael Grzeschik
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Marc Kleine-Budde @ 2026-01-31 15:11 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, linux-can, linux-wireless, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Vincent Mailhol, Ido Schimmel, Petr Machata, Sridhar Samudrala,
	Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

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

On 30.01.2026 16:42:56, Ethan Nelson-Moore wrote:
> Many network drivers have unnecessary empty module_init and module_exit
> functions. Remove them (including some that just print a message). Note
> that if a module_init function exists, a module_exit function must also
> exist; otherwise, the module cannot be unloaded.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---
>  drivers/net/can/sja1000/sja1000.c             | 16 ----------

For drivers/net/can

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

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

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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
  2026-01-31 15:11 ` Marc Kleine-Budde
@ 2026-01-31 21:30 ` Michael Grzeschik
  2026-02-01 13:47 ` Ido Schimmel
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Michael Grzeschik @ 2026-01-31 21:30 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, linux-can, linux-wireless, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Marc Kleine-Budde,
	Vincent Mailhol, Ido Schimmel, Petr Machata, Sridhar Samudrala,
	Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

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

On Fri, Jan 30, 2026 at 04:42:56PM -0800, Ethan Nelson-Moore wrote:
>Many network drivers have unnecessary empty module_init and module_exit
>functions. Remove them (including some that just print a message). Note
>that if a module_init function exists, a module_exit function must also
>exist; otherwise, the module cannot be unloaded.
>
>Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
>---
> drivers/net/arcnet/com20020.c                 | 16 ----------

For drivers/net/arcnet:

Acked-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
  2026-01-31 15:11 ` Marc Kleine-Budde
  2026-01-31 21:30 ` Michael Grzeschik
@ 2026-02-01 13:47 ` Ido Schimmel
  2026-02-02  0:39 ` Ping-Ke Shih
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Ido Schimmel @ 2026-02-01 13:47 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, linux-can, linux-wireless, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Marc Kleine-Budde, Vincent Mailhol, Petr Machata,
	Sridhar Samudrala, Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

On Fri, Jan 30, 2026 at 04:42:56PM -0800, Ethan Nelson-Moore wrote:
> Many network drivers have unnecessary empty module_init and module_exit
> functions. Remove them (including some that just print a message). Note
> that if a module_init function exists, a module_exit function must also
> exist; otherwise, the module cannot be unloaded.
> 
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>

For mlxsw:

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

Thanks

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

* RE: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
                   ` (2 preceding siblings ...)
  2026-02-01 13:47 ` Ido Schimmel
@ 2026-02-02  0:39 ` Ping-Ke Shih
  2026-02-02  9:17 ` Toke Høiland-Jørgensen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Ping-Ke Shih @ 2026-02-02  0:39 UTC (permalink / raw)
  To: Ethan Nelson-Moore, netdev@vger.kernel.org,
	linux-can@vger.kernel.org, linux-wireless@vger.kernel.org
  Cc: Michael Grzeschik, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Marc Kleine-Budde, Vincent Mailhol,
	Ido Schimmel, Petr Machata, Sridhar Samudrala,
	Toke Høiland-Jørgensen, Thomas Mühlbacher,
	Oliver Hartkopp

Ethan Nelson-Moore <enelsonmoore@gmail.com> wrote:
> Many network drivers have unnecessary empty module_init and module_exit
> functions. Remove them (including some that just print a message). Note
> that if a module_init function exists, a module_exit function must also
> exist; otherwise, the module cannot be unloaded.
> 
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---
>  drivers/net/arcnet/com20020.c                 | 16 ----------
>  drivers/net/can/sja1000/sja1000.c             | 16 ----------
>  drivers/net/ethernet/8390/8390.c              | 14 ---------
>  drivers/net/ethernet/8390/8390p.c             | 11 -------
>  drivers/net/ethernet/mellanox/mlxsw/pci.c     | 12 --------
>  drivers/net/hamradio/hdlcdrv.c                | 20 -------------
>  drivers/net/net_failover.c                    | 13 ---------
>  drivers/net/wireless/ath/ath9k/common.c       | 12 --------
>  .../realtek/rtlwifi/btcoexist/rtl_btc.c       | 13 ---------

For rtlwifi driver:

Acked-by: Ping-Ke Shih <pkshih@realtek.com>



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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
                   ` (3 preceding siblings ...)
  2026-02-02  0:39 ` Ping-Ke Shih
@ 2026-02-02  9:17 ` Toke Høiland-Jørgensen
  2026-02-02 20:29 ` Andrew Lunn
  2026-02-03  1:50 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 11+ messages in thread
From: Toke Høiland-Jørgensen @ 2026-02-02  9:17 UTC (permalink / raw)
  To: Ethan Nelson-Moore, netdev, linux-can, linux-wireless
  Cc: Ethan Nelson-Moore, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Marc Kleine-Budde, Vincent Mailhol, Ido Schimmel, Petr Machata,
	Sridhar Samudrala, Ping-Ke Shih, Thomas Mühlbacher,
	Oliver Hartkopp

Ethan Nelson-Moore <enelsonmoore@gmail.com> writes:

> Many network drivers have unnecessary empty module_init and module_exit
> functions. Remove them (including some that just print a message). Note
> that if a module_init function exists, a module_exit function must also
> exist; otherwise, the module cannot be unloaded.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>

For ath9k:

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>

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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
                   ` (4 preceding siblings ...)
  2026-02-02  9:17 ` Toke Høiland-Jørgensen
@ 2026-02-02 20:29 ` Andrew Lunn
  2026-02-02 20:33   ` Ethan Nelson-Moore
  2026-02-03  1:50 ` patchwork-bot+netdevbpf
  6 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2026-02-02 20:29 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, linux-can, linux-wireless, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Marc Kleine-Budde, Vincent Mailhol, Ido Schimmel, Petr Machata,
	Sridhar Samudrala, Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

On Fri, Jan 30, 2026 at 04:42:56PM -0800, Ethan Nelson-Moore wrote:
> Many network drivers have unnecessary empty module_init and module_exit
> functions. Remove them (including some that just print a message). Note
> that if a module_init function exists, a module_exit function must also
> exist; otherwise, the module cannot be unloaded.

I could be missing it, but which module does not have an module_exit
function?

I ask, because maybe the author does not want to allow the module to
be unloaded. We should look at the history of that module.

   Andrew

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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-02-02 20:29 ` Andrew Lunn
@ 2026-02-02 20:33   ` Ethan Nelson-Moore
  2026-02-02 21:56     ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: Ethan Nelson-Moore @ 2026-02-02 20:33 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: netdev, linux-can, linux-wireless, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Marc Kleine-Budde, Vincent Mailhol, Ido Schimmel, Petr Machata,
	Sridhar Samudrala, Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

Hi, Andrew,

On Mon, Feb 2, 2026 at 12:29 PM Andrew Lunn <andrew@lunn.ch> wrote:
> I could be missing it, but which module does not have an module_exit
> function?
None of them. That sentence was just to explain why other instances of
empty module_exit functions were not removed, in case someone else
tries to do that. I didn't realize module_exit was required to unload
the module at first, and other people might not either.

Ethan

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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-02-02 20:33   ` Ethan Nelson-Moore
@ 2026-02-02 21:56     ` Andrew Lunn
  2026-02-03  0:56       ` Ethan Nelson-Moore
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2026-02-02 21:56 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, linux-can, linux-wireless, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Marc Kleine-Budde, Vincent Mailhol, Ido Schimmel, Petr Machata,
	Sridhar Samudrala, Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

On Mon, Feb 02, 2026 at 12:33:08PM -0800, Ethan Nelson-Moore wrote:
> Hi, Andrew,
> 
> On Mon, Feb 2, 2026 at 12:29 PM Andrew Lunn <andrew@lunn.ch> wrote:
> > I could be missing it, but which module does not have an module_exit
> > function?
> None of them. That sentence was just to explain why other instances of
> empty module_exit functions were not removed, in case someone else
> tries to do that. I didn't realize module_exit was required to unload
> the module at first, and other people might not either.

You need to be careful with commit messages. Reviewers read them, and
think about the implications of what they say. As a result, you wasted
some of my time looking for a driver which did not have an
module_exit, and wondering if there was a legitimate reason for not
having it, and had you just broken it....

       Andrew


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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-02-02 21:56     ` Andrew Lunn
@ 2026-02-03  0:56       ` Ethan Nelson-Moore
  0 siblings, 0 replies; 11+ messages in thread
From: Ethan Nelson-Moore @ 2026-02-03  0:56 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: netdev, linux-can, linux-wireless, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Marc Kleine-Budde, Vincent Mailhol, Ido Schimmel, Petr Machata,
	Sridhar Samudrala, Toke Høiland-Jørgensen, Ping-Ke Shih,
	Thomas Mühlbacher, Oliver Hartkopp

On Mon, Feb 2, 2026 at 1:56 PM Andrew Lunn <andrew@lunn.ch> wrote:
> You need to be careful with commit messages. Reviewers read them, and
> think about the implications of what they say. As a result, you wasted
> some of my time looking for a driver which did not have an
> module_exit, and wondering if there was a legitimate reason for not
> having it, and had you just broken it....
Sorry about that. Should I send another version with a better commit
message or is this patch okay the way it is?

Ethan

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

* Re: [PATCH net-next] net: remove unnecessary module_init/exit functions
  2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
                   ` (5 preceding siblings ...)
  2026-02-02 20:29 ` Andrew Lunn
@ 2026-02-03  1:50 ` patchwork-bot+netdevbpf
  6 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-03  1:50 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, linux-can, linux-wireless, m.grzeschik, andrew+netdev,
	davem, edumazet, kuba, pabeni, mkl, mailhol, idosch, petrm,
	sridhar.samudrala, toke, pkshih, tmuehlbacher, socketcan

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 30 Jan 2026 16:42:56 -0800 you wrote:
> Many network drivers have unnecessary empty module_init and module_exit
> functions. Remove them (including some that just print a message). Note
> that if a module_init function exists, a module_exit function must also
> exist; otherwise, the module cannot be unloaded.
> 
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: remove unnecessary module_init/exit functions
    https://git.kernel.org/netdev/net-next/c/e0221553436b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-02-03  1:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-31  0:42 [PATCH net-next] net: remove unnecessary module_init/exit functions Ethan Nelson-Moore
2026-01-31 15:11 ` Marc Kleine-Budde
2026-01-31 21:30 ` Michael Grzeschik
2026-02-01 13:47 ` Ido Schimmel
2026-02-02  0:39 ` Ping-Ke Shih
2026-02-02  9:17 ` Toke Høiland-Jørgensen
2026-02-02 20:29 ` Andrew Lunn
2026-02-02 20:33   ` Ethan Nelson-Moore
2026-02-02 21:56     ` Andrew Lunn
2026-02-03  0:56       ` Ethan Nelson-Moore
2026-02-03  1:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox