public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: arcnet: com20020-pci: use module_pci_driver
@ 2026-02-05  7:06 Ethan Nelson-Moore
  2026-02-09 16:03 ` Simon Horman
  2026-02-10  9:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Ethan Nelson-Moore @ 2026-02-05  7:06 UTC (permalink / raw)
  To: netdev
  Cc: Ethan Nelson-Moore, Michael Grzeschik, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni

The only thing this driver's init/exit functions do is call
pci_register/unregister_driver, and in the case of the init function,
print an unnecessary message. Replace them with module_pci_driver to
simplify the code.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
 drivers/net/arcnet/com20020-pci.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
index 0472bcdff130..19e411b2e3a7 100644
--- a/drivers/net/arcnet/com20020-pci.c
+++ b/drivers/net/arcnet/com20020-pci.c
@@ -618,17 +618,4 @@ static struct pci_driver com20020pci_driver = {
 	.remove		= com20020pci_remove,
 };
 
-static int __init com20020pci_init(void)
-{
-	if (BUGLVL(D_NORMAL))
-		pr_info("%s\n", "COM20020 PCI support");
-	return pci_register_driver(&com20020pci_driver);
-}
-
-static void __exit com20020pci_cleanup(void)
-{
-	pci_unregister_driver(&com20020pci_driver);
-}
-
-module_init(com20020pci_init)
-module_exit(com20020pci_cleanup)
+module_pci_driver(com20020pci_driver);
-- 
2.43.0


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

* Re: [PATCH net-next] net: arcnet: com20020-pci: use module_pci_driver
  2026-02-05  7:06 [PATCH net-next] net: arcnet: com20020-pci: use module_pci_driver Ethan Nelson-Moore
@ 2026-02-09 16:03 ` Simon Horman
  2026-02-09 22:03   ` Ethan Nelson-Moore
  2026-02-10  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Horman @ 2026-02-09 16:03 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, Michael Grzeschik, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni

On Wed, Feb 04, 2026 at 11:06:31PM -0800, Ethan Nelson-Moore wrote:
> The only thing this driver's init/exit functions do is call
> pci_register/unregister_driver, and in the case of the init function,
> print an unnecessary message. Replace them with module_pci_driver to
> simplify the code.
> 
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>

I'm not sure that I see the value of cleanups to this driver.
Which hasn't seen much activity for a while now.

But I agree the change is correct.

Reviewed-by: Simon Horman <horms@kernel.org>

...

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

* Re: [PATCH net-next] net: arcnet: com20020-pci: use module_pci_driver
  2026-02-09 16:03 ` Simon Horman
@ 2026-02-09 22:03   ` Ethan Nelson-Moore
  0 siblings, 0 replies; 4+ messages in thread
From: Ethan Nelson-Moore @ 2026-02-09 22:03 UTC (permalink / raw)
  To: Simon Horman
  Cc: netdev, Michael Grzeschik, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni

Hi, Simon,

On Mon, Feb 9, 2026 at 8:03 AM Simon Horman <horms@kernel.org> wrote:
> I'm not sure that I see the value of cleanups to this driver.
> Which hasn't seen much activity for a while now.
That probably indicates that it has no major issues, not that it isn't
being used. ARCnet cards are still actively sold by Contemporary
Controls and SOHARD; ARCnet is used in industrial environments where
its timing determinism is important.

Ethan

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

* Re: [PATCH net-next] net: arcnet: com20020-pci: use module_pci_driver
  2026-02-05  7:06 [PATCH net-next] net: arcnet: com20020-pci: use module_pci_driver Ethan Nelson-Moore
  2026-02-09 16:03 ` Simon Horman
@ 2026-02-10  9:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-10  9:30 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: netdev, m.grzeschik, andrew+netdev, davem, edumazet, kuba, pabeni

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  4 Feb 2026 23:06:31 -0800 you wrote:
> The only thing this driver's init/exit functions do is call
> pci_register/unregister_driver, and in the case of the init function,
> print an unnecessary message. Replace them with module_pci_driver to
> simplify the code.
> 
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: arcnet: com20020-pci: use module_pci_driver
    https://git.kernel.org/netdev/net-next/c/d82cb7b7ec42

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] 4+ messages in thread

end of thread, other threads:[~2026-02-10  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05  7:06 [PATCH net-next] net: arcnet: com20020-pci: use module_pci_driver Ethan Nelson-Moore
2026-02-09 16:03 ` Simon Horman
2026-02-09 22:03   ` Ethan Nelson-Moore
2026-02-10  9:30 ` 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