Skip to contentSkip to conversation

net/staging: Don't bother filling in ethtool driver version

PATCH In review John Garry 3 participants 6 messages Feb 22, 2024 – Feb 24, 2024

Subsystems (5)
lore
Share & tools
lore

John Garry

author
#0 lore raw

cover net/staging: Don't bother filling in ethtool driver version

The drivers included in this series set the ethtool driver version to the same as the default, UTS_RELEASE, so don't both doing this.

As noted by Masahiro in [0], with CONFIG_MODVERSIONS=y, some drivers could be built as modules against a different kernel tree with differing UTS_RELEASE. As such, these changes could lead to a change in behaviour. However, defaulting to the core kernel UTS_RELEASE would be expected behaviour.

These patches are for netdev and staging trees, and I hope that the respective maintainers can pick up the patches separately.

[0] https://lore.kernel.org/all/CAK7LNASfTW+OMk1cJJWb4E6P+=k0FEsm_=6FDfDF_mTrxJCSMQ@mail.gmail.com/

John Garry (3):
rocker: Don't bother filling in ethtool driver version
net: team: Don't bother filling in ethtool driver version
staging: octeon: Don't bother filling in ethtool driver version

 drivers/net/ethernet/rocker/rocker_main.c | 2 --
 drivers/net/team/team.c                   | 2 --
 drivers/staging/octeon/ethernet-mdio.c    | 2 --
 3 files changed, 6 deletions(-)
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 1/3 rocker: Don't bother filling in ethtool driver version

The version is same as the default, so don't bother filling it in.

---
 drivers/net/ethernet/rocker/rocker_main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/rocker/rocker_main.c +0 -2
index 9e59669a93dd..755db89db909 100644
@@ -32,7 +32,6 @@
 #include <net/fib_rules.h>
 #include <net/fib_notifier.h>
 #include <linux/io-64-nonatomic-lo-hi.h>
-#include <generated/utsrelease.h>
 
 #include "rocker_hw.h"
 #include "rocker.h"
@@ -2227,7 +2226,6 @@ static void rocker_port_get_drvinfo(struct net_device *dev,
 				    struct ethtool_drvinfo *drvinfo)
 {
 	strscpy(drvinfo->driver, rocker_driver_name, sizeof(drvinfo->driver));
-	strscpy(drvinfo->version, UTS_RELEASE, sizeof(drvinfo->version));
 }
 
 static struct rocker_port_stats {
Signature · 1 line
2.31.1
author
#2 lore raw

PATCH 2/3 net: team: Don't bother filling in ethtool driver version

In reply to John Garry

The version is same as the default, so don't bother filling it in.

---
 drivers/net/team/team.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/team/team.c +0 -2
index f575f225d417..0a44bbdcfb7b 100644
@@ -25,7 +25,6 @@
 #include <net/genetlink.h>
 #include <net/netlink.h>
 #include <net/sch_generic.h>
-#include <generated/utsrelease.h>
 #include <linux/if_team.h>
 
 #define DRV_NAME "team"
@@ -2074,7 +2073,6 @@ static void team_ethtool_get_drvinfo(struct net_device *dev,
 				     struct ethtool_drvinfo *drvinfo)
 {
 	strscpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver));
-	strscpy(drvinfo->version, UTS_RELEASE, sizeof(drvinfo->version));
 }
 
 static int team_ethtool_get_link_ksettings(struct net_device *dev,
Signature · 1 line
2.31.1
author
#3 lore raw

PATCH 3/3 staging: octeon: Don't bother filling in ethtool driver version

In reply to John Garry

The version is same as the default, so don't bother filling it in.

---
 drivers/staging/octeon/ethernet-mdio.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/octeon/ethernet-mdio.c +0 -2
index b3049108edc4..211423059e30 100644
@@ -10,7 +10,6 @@
 #include <linux/phy.h>
 #include <linux/ratelimit.h>
 #include <linux/of_mdio.h>
-#include <generated/utsrelease.h>
 #include <net/dst.h>
 
 #include "octeon-ethernet.h"
@@ -22,7 +21,6 @@ static void cvm_oct_get_drvinfo(struct net_device *dev,
 				struct ethtool_drvinfo *info)
 {
 	strscpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
-	strscpy(info->version, UTS_RELEASE, sizeof(info->version));
 	strscpy(info->bus_info, "Builtin", sizeof(info->bus_info));
 }
 
Signature · 1 line
2.31.1
maintainer Reviewed-by on the v1 series
#4 lore raw
In reply to John Garry
Quoted 19 lines · Thu, Feb 22, 2024 at 10:00:39AM CET, [email protected] wrote:

The drivers included in this series set the ethtool driver version to the same as the default, UTS_RELEASE, so don't both doing this.

As noted by Masahiro in [0], with CONFIG_MODVERSIONS=y, some drivers could be built as modules against a different kernel tree with differing UTS_RELEASE. As such, these changes could lead to a change in behaviour. However, defaulting to the core kernel UTS_RELEASE would be expected behaviour.

These patches are for netdev and staging trees, and I hope that the respective maintainers can pick up the patches separately.

[0] https://lore.kernel.org/all/CAK7LNASfTW+OMk1cJJWb4E6P+=k0FEsm_=6FDfDF_mTrxJCSMQ@mail.gmail.com/

John Garry (3):
rocker: Don't bother filling in ethtool driver version
net: team: Don't bother filling in ethtool driver version
staging: octeon: Don't bother filling in ethtool driver version

Quoted 4 lines
drivers/net/ethernet/rocker/rocker_main.c | 2 --
drivers/net/team/team.c                   | 2 --
drivers/staging/octeon/ethernet-mdio.c    | 2 --
3 files changed, 6 deletions(-)

The set looks fine to me.

#5 lore raw
In reply to John Garry
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Thu, 22 Feb 2024 09:00:39 +0000 you wrote:

The drivers included in this series set the ethtool driver version to the same as the default, UTS_RELEASE, so don't both doing this.

As noted by Masahiro in [0], with CONFIG_MODVERSIONS=y, some drivers could be built as modules against a different kernel tree with differing UTS_RELEASE. As such, these changes could lead to a change in behaviour. However, defaulting to the core kernel UTS_RELEASE would be expected behaviour.

[...]

Here is the summary with links:
- [net-next,1/3] rocker: Don't bother filling in ethtool driver version

    https://git.kernel.org/netdev/net-next/c/23fe265fbfbc
  - [net-next,2/3] net: team: Don't bother filling in ethtool driver version
    https://git.kernel.org/netdev/net-next/c/0a4e1b453a8a

- [3/3] staging: octeon: Don't bother filling in ethtool driver version (no matching commit)

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html