* [PATCH] sis900: remove module version and switch to module_pci_driver
@ 2025-12-11 7:57 Ethan Nelson-Moore
2025-12-11 10:46 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Ethan Nelson-Moore @ 2025-12-11 7:57 UTC (permalink / raw)
To: netdev; +Cc: Ethan Nelson-Moore
The module version is useless, and the only thing the
sis900_init_module routine did besides pci_register_driver was to print
the version.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
drivers/net/ethernet/sis/sis900.c | 31 +------------------------------
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
index b461918dc5f4..d85ac8cbeb00 100644
--- a/drivers/net/ethernet/sis/sis900.c
+++ b/drivers/net/ethernet/sis/sis900.c
@@ -79,10 +79,6 @@
#include "sis900.h"
#define SIS900_MODULE_NAME "sis900"
-#define SIS900_DRV_VERSION "v1.08.10 Apr. 2 2006"
-
-static const char version[] =
- KERN_INFO "sis900.c: " SIS900_DRV_VERSION "\n";
static int max_interrupt_work = 40;
static int multicast_filter_limit = 128;
@@ -442,13 +438,6 @@ static int sis900_probe(struct pci_dev *pci_dev,
const char *card_name = card_names[pci_id->driver_data];
const char *dev_name = pci_name(pci_dev);
-/* when built into the kernel, we only print version if device is found */
-#ifndef MODULE
- static int printed_version;
- if (!printed_version++)
- printk(version);
-#endif
-
/* setup various bits in PCI command register */
ret = pcim_enable_device(pci_dev);
if(ret) return ret;
@@ -2029,7 +2018,6 @@ static void sis900_get_drvinfo(struct net_device *net_dev,
struct sis900_private *sis_priv = netdev_priv(net_dev);
strscpy(info->driver, SIS900_MODULE_NAME, sizeof(info->driver));
- strscpy(info->version, SIS900_DRV_VERSION, sizeof(info->version));
strscpy(info->bus_info, pci_name(sis_priv->pci_dev),
sizeof(info->bus_info));
}
@@ -2567,21 +2555,4 @@ static struct pci_driver sis900_pci_driver = {
.driver.pm = &sis900_pm_ops,
};
-static int __init sis900_init_module(void)
-{
-/* when a module, this is printed whether or not devices are found in probe */
-#ifdef MODULE
- printk(version);
-#endif
-
- return pci_register_driver(&sis900_pci_driver);
-}
-
-static void __exit sis900_cleanup_module(void)
-{
- pci_unregister_driver(&sis900_pci_driver);
-}
-
-module_init(sis900_init_module);
-module_exit(sis900_cleanup_module);
-
+module_pci_driver(sis900_pci_driver);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] sis900: remove module version and switch to module_pci_driver
2025-12-11 7:57 [PATCH] sis900: remove module version and switch to module_pci_driver Ethan Nelson-Moore
@ 2025-12-11 10:46 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2025-12-11 10:46 UTC (permalink / raw)
To: Ethan Nelson-Moore; +Cc: netdev
On Wed, Dec 10, 2025 at 11:57:34PM -0800, Ethan Nelson-Moore wrote:
> The module version is useless, and the only thing the
> sis900_init_module routine did besides pci_register_driver was to print
> the version.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Hi Ethan,
Thanks for your patch.
And I agree that not having this kind of information is current best
practice (and has been for quite some time AFAIK). So I think this patch
is a good way to go.
Reviewed-by: Simon Horman <horms@kernel.org>
However, I also think that this is net-next material.
It's best to make that clear by targeting the net-next tree like this.
Subject: [PATCH net-next] ...
It usually isn't necessary to repost a patch just to address this.
But as it happens net-next is currently closed. So I'd like to
ask you to repost this once it re-opens.
## Form letter - net-next-closed
The merge window for v6.19 has begun and therefore net-next has closed
for new drivers, features, code refactoring and optimizations. We are
currently accepting bug fixes only.
Please repost when net-next reopens.
Due to a combination of the merge-window, travel commitments of the
maintainers, and the holiday season, net-next will re-open after
2nd January.
RFC patches sent for review only are welcome at any time.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
--
pw-bot: defer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-11 10:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11 7:57 [PATCH] sis900: remove module version and switch to module_pci_driver Ethan Nelson-Moore
2025-12-11 10:46 ` Simon Horman
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).