* 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