Skip to contentSkip to conversation

sis900: remove module version and switch to module_pci_driver

PATCH In review Ethan Nelson-Moore 2 participants 2 messages Dec 11, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sis900: remove module version and switch to module_pci_driver

The module version is useless, and the only thing the sis900_init_module routine did besides pci_register_driver was to print the version.

---
 drivers/net/ethernet/sis/sis900.c | 31 +------------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)
drivers/net/ethernet/sis/sis900.c +1 -30
index b461918dc5f4..d85ac8cbeb00 100644
@@ -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);
Signature · 1 line
2.43.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · 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.

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.

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