* [PATCH] epic100: remove module version and switch to module_pci_driver
@ 2025-12-11 7:49 Ethan Nelson-Moore
2025-12-11 10:36 ` Simon Horman
2025-12-11 16:57 ` Sai Krishna Gajula
0 siblings, 2 replies; 5+ messages in thread
From: Ethan Nelson-Moore @ 2025-12-11 7:49 UTC (permalink / raw)
To: netdev; +Cc: Ethan Nelson-Moore
The module version is useless, and the only thing the epic_init routine
did besides pci_register_driver was to print the version.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
drivers/net/ethernet/smsc/epic100.c | 35 +----------------------------
1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/drivers/net/ethernet/smsc/epic100.c b/drivers/net/ethernet/smsc/epic100.c
index 45f703fe0e5a..389659db06a8 100644
--- a/drivers/net/ethernet/smsc/epic100.c
+++ b/drivers/net/ethernet/smsc/epic100.c
@@ -26,8 +26,6 @@
*/
#define DRV_NAME "epic100"
-#define DRV_VERSION "2.1"
-#define DRV_RELDATE "Sept 11, 2006"
/* The user-configurable values.
These may be modified when a driver module is loaded.*/
@@ -89,12 +87,6 @@ static int rx_copybreak;
#include <linux/uaccess.h>
#include <asm/byteorder.h>
-/* These identify the driver base version and may not be removed. */
-static char version[] =
-DRV_NAME ".c:v1.11 1/7/2001 Written by Donald Becker <becker@scyld.com>";
-static char version2[] =
-" (unofficial 2.4.x kernel port, version " DRV_VERSION ", " DRV_RELDATE ")";
-
MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
MODULE_DESCRIPTION("SMC 83c170 EPIC series Ethernet driver");
MODULE_LICENSE("GPL");
@@ -329,11 +321,6 @@ static int epic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
void *ring_space;
dma_addr_t ring_dma;
-/* when built into the kernel, we only print version if device is found */
-#ifndef MODULE
- pr_info_once("%s%s\n", version, version2);
-#endif
-
card_idx++;
ret = pci_enable_device(pdev);
@@ -1393,7 +1380,6 @@ static void netdev_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *
struct epic_private *np = netdev_priv(dev);
strscpy(info->driver, DRV_NAME, sizeof(info->driver));
- strscpy(info->version, DRV_VERSION, sizeof(info->version));
strscpy(info->bus_info, pci_name(np->pci_dev), sizeof(info->bus_info));
}
@@ -1564,23 +1550,4 @@ static struct pci_driver epic_driver = {
.driver.pm = &epic_pm_ops,
};
-
-static int __init epic_init (void)
-{
-/* when a module, this is printed whether or not devices are found in probe */
-#ifdef MODULE
- pr_info("%s%s\n", version, version2);
-#endif
-
- return pci_register_driver(&epic_driver);
-}
-
-
-static void __exit epic_cleanup (void)
-{
- pci_unregister_driver (&epic_driver);
-}
-
-
-module_init(epic_init);
-module_exit(epic_cleanup);
+module_pci_driver(epic_driver);
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] epic100: remove module version and switch to module_pci_driver
2025-12-11 7:49 [PATCH] epic100: remove module version and switch to module_pci_driver Ethan Nelson-Moore
@ 2025-12-11 10:36 ` Simon Horman
2025-12-12 0:35 ` Francois Romieu
2025-12-11 16:57 ` Sai Krishna Gajula
1 sibling, 1 reply; 5+ messages in thread
From: Simon Horman @ 2025-12-11 10:36 UTC (permalink / raw)
To: Ethan Nelson-Moore; +Cc: netdev
On Wed, Dec 10, 2025 at 11:49:22PM -0800, Ethan Nelson-Moore wrote:
> The module version is useless, and the only thing the epic_init routine
> did besides pci_register_driver was to print the version.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---
> drivers/net/ethernet/smsc/epic100.c | 35 +----------------------------
Hi Ethan,
Thanks for your patch.
I note that author information is remains present in a comment at the top
of this file. 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] 5+ messages in thread
* RE: [PATCH] epic100: remove module version and switch to module_pci_driver
2025-12-11 7:49 [PATCH] epic100: remove module version and switch to module_pci_driver Ethan Nelson-Moore
2025-12-11 10:36 ` Simon Horman
@ 2025-12-11 16:57 ` Sai Krishna Gajula
2025-12-12 0:36 ` Francois Romieu
1 sibling, 1 reply; 5+ messages in thread
From: Sai Krishna Gajula @ 2025-12-11 16:57 UTC (permalink / raw)
To: Ethan Nelson-Moore, netdev@vger.kernel.org
> -----Original Message-----
> From: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> Sent: Thursday, December 11, 2025 1:19 PM
> To: netdev@vger.kernel.org
> Cc: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> Subject: [PATCH] epic100: remove module version and switch to
> module_pci_driver
>
> The module version is useless, and the only thing the epic_init routine did
> besides pci_register_driver was to print the version. Signed-off-by: Ethan
> Nelson-Moore <enelsonmoore@ gmail. com> ---
> drivers/net/ethernet/smsc/epic100. c | 35 +----------------------------
> The module version is useless, and the only thing the epic_init routine did
> besides pci_register_driver was to print the version.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---
> drivers/net/ethernet/smsc/epic100.c | 35 +----------------------------
> 1 file changed, 1 insertion(+), 34 deletions(-)
>
> diff --git a/drivers/net/ethernet/smsc/epic100.c
> b/drivers/net/ethernet/smsc/epic100.c
> index 45f703fe0e5a..389659db06a8 100644
> --- a/drivers/net/ethernet/smsc/epic100.c
> +++ b/drivers/net/ethernet/smsc/epic100.c
> @@ -26,8 +26,6 @@
> */
>
> #define DRV_NAME "epic100"
> -#define DRV_VERSION "2.1"
> -#define DRV_RELDATE "Sept 11, 2006"
>
> /* The user-configurable values.
> These may be modified when a driver module is loaded.*/ @@ -89,12
> +87,6 @@ static int rx_copybreak; #include <linux/uaccess.h> #include
> <asm/byteorder.h>
>
> -/* These identify the driver base version and may not be removed. */ -static
> char version[] = -DRV_NAME ".c:v1.11 1/7/2001 Written by Donald Becker
> <becker@scyld.com>"; -static char version2[] = -" (unofficial 2.4.x kernel port,
> version " DRV_VERSION ", " DRV_RELDATE ")";
> -
> MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
> MODULE_DESCRIPTION("SMC 83c170 EPIC series Ethernet driver");
> MODULE_LICENSE("GPL"); @@ -329,11 +321,6 @@ static int
> epic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> void *ring_space;
> dma_addr_t ring_dma;
>
> -/* when built into the kernel, we only print version if device is found */ -
> #ifndef MODULE
> - pr_info_once("%s%s\n", version, version2);
> -#endif
> -
> card_idx++;
>
> ret = pci_enable_device(pdev);
> @@ -1393,7 +1380,6 @@ static void netdev_get_drvinfo (struct net_device
> *dev, struct ethtool_drvinfo *
> struct epic_private *np = netdev_priv(dev);
>
> strscpy(info->driver, DRV_NAME, sizeof(info->driver));
> - strscpy(info->version, DRV_VERSION, sizeof(info->version));
> strscpy(info->bus_info, pci_name(np->pci_dev), sizeof(info-
> >bus_info)); }
>
> @@ -1564,23 +1550,4 @@ static struct pci_driver epic_driver = {
> .driver.pm = &epic_pm_ops,
> };
>
> -
> -static int __init epic_init (void)
> -{
> -/* when a module, this is printed whether or not devices are found in probe
> */ -#ifdef MODULE
> - pr_info("%s%s\n", version, version2);
> -#endif
> -
> - return pci_register_driver(&epic_driver);
> -}
> -
> -
> -static void __exit epic_cleanup (void)
> -{
> - pci_unregister_driver (&epic_driver);
> -}
> -
> -
> -module_init(epic_init);
> -module_exit(epic_cleanup);
> +module_pci_driver(epic_driver);
> --
> 2.43.0
>
One downside is, users who previously relied on the printed epic100 version strings in dmesg, will no longer see them.
Reviewed-by: Sai Krishna <saikrishnag@marvell.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] epic100: remove module version and switch to module_pci_driver
2025-12-11 10:36 ` Simon Horman
@ 2025-12-12 0:35 ` Francois Romieu
0 siblings, 0 replies; 5+ messages in thread
From: Francois Romieu @ 2025-12-12 0:35 UTC (permalink / raw)
To: Simon Horman; +Cc: Ethan Nelson-Moore, netdev
Simon Horman <horms@kernel.org> :
[...]
> I note that author information is remains present in a comment at the top
> of this file. 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.
The part below may still be relevant:
This driver is for the SMC83c170/175 "EPIC" series, as used on the
SMC EtherPower II 9432 PCI adapter, and several CardBus cards.
Anything else at the top of the file was a tribute to Donald Becker's work
before he stopped contributing to mainline drivers, more than 20 years ago,
in a pre-NAPI era. NAPI support for this driver was coined together in 2004
and Donald Becker was already silent on netdev for quite some time IIRC.
Go for it.
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] epic100: remove module version and switch to module_pci_driver
2025-12-11 16:57 ` Sai Krishna Gajula
@ 2025-12-12 0:36 ` Francois Romieu
0 siblings, 0 replies; 5+ messages in thread
From: Francois Romieu @ 2025-12-12 0:36 UTC (permalink / raw)
To: Sai Krishna Gajula; +Cc: Ethan Nelson-Moore, netdev@vger.kernel.org
Sai Krishna Gajula <saikrishnag@marvell.com> :
[...]
> One downside is, users who previously relied on the printed epic100 version strings in dmesg, will no longer see them.
It may be called a feature so that devs who previously relied on users hear
them again.
There is also a user noticeable change in ethtool_drvinfo.
User(s) of this hardware are probably able to cope anyway.
--
Ueimor
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-12-12 0:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11 7:49 [PATCH] epic100: remove module version and switch to module_pci_driver Ethan Nelson-Moore
2025-12-11 10:36 ` Simon Horman
2025-12-12 0:35 ` Francois Romieu
2025-12-11 16:57 ` Sai Krishna Gajula
2025-12-12 0:36 ` Francois Romieu
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).