Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of drivers
Subsystems (10)
PATCH 1/1 Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of drivers
From: Rick Jones <[email protected]>
Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to fw_version in various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such.
---
Compiled only.
drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c | 1 - drivers/net/ethernet/atheros/atlx/atl1.c | 1 - drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 1 - drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 5 +---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +--- drivers/net/ethernet/intel/e100.c | 1 - drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 1 - drivers/net/ethernet/intel/igbvf/ethtool.c | 2 -- drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c | 1 - drivers/net/ethernet/intel/ixgbevf/ethtool.c | 10 +++++----- drivers/net/ethernet/marvell/skge.c | 1 - drivers/net/ethernet/marvell/sky2.c | 1 - .../ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | 1 - drivers/net/ethernet/qlogic/qla3xxx.c | 1 - drivers/net/tun.c | 1 - drivers/net/veth.c | 1 - drivers/net/vmxnet3/vmxnet3_ethtool.c | 5 ----- 17 files changed, 7 insertions(+), 31 deletions(-)
drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c +0 -1
@@ -232,7 +232,6 @@ static void atl1c_get_drvinfo(struct net_device *netdev,strlcpy (drvinfo->driver, atl1c_driver_name,sizeof (drvinfo->driver));strlcpy (drvinfo->version, atl1c_driver_version,sizeof (drvinfo->version)); -strlcpy (drvinfo->fw_version,"N/A" ,sizeof (drvinfo->fw_version));strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),sizeof (drvinfo->bus_info)); drvinfo->n_stats =0 ;
drivers/net/ethernet/atheros/atlx/atl1.c +0 -1
@@ -3365,7 +3365,6 @@ static void atl1_get_drvinfo(struct net_device *netdev,strlcpy (drvinfo->driver,ATLX_DRIVER_NAME ,sizeof (drvinfo->driver));strlcpy (drvinfo->version,ATLX_DRIVER_VERSION ,sizeof (drvinfo->version)); -strlcpy (drvinfo->fw_version,"N/A" ,sizeof (drvinfo->fw_version));strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),sizeof (drvinfo->bus_info)); drvinfo->eedump_len =ATL1_EEDUMP_LEN ;
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +0 -1
@@ -436,7 +436,6 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)strlcpy (info->driver,DRV_NAME ,sizeof (info->driver));strlcpy (info->version,DRV_VERSION ,sizeof (info->version)); -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version));strlcpy (info->bus_info,pci_name (adapter->pdev),sizeof (info->bus_info)); }
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +1 -4
@@ -1580,9 +1580,7 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)strlcpy (info->version,DRV_VERSION ,sizeof (info->version));strlcpy (info->bus_info,pci_name (adapter->pdev),sizeof (info->bus_info)); -if (!fw_vers) -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version)); -else { +if (fw_vers) snprintf(info->fw_version, sizeof(info->fw_version), "%s %u.%u.%u TP %u.%u.%u", G_FW_VERSION_TYPE(fw_vers) ? "T" : "N",
@@ -1592,7 +1590,6 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)G_TP_VERSION_MAJOR (tp_vers),G_TP_VERSION_MINOR (tp_vers), G_TP_VERSION_MICRO(tp_vers)); - } }static void get_strings (struct net_device *dev,u32 stringset,u8 * data)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -3
@@ -1007,9 +1007,7 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)strlcpy (info->bus_info,pci_name (adapter->pdev),sizeof (info->bus_info)); -if (!adapter->params.fw_vers) -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version)); -else +if (adapter->params.fw_vers) snprintf(info->fw_version, sizeof(info->fw_version), "%u.%u.%u.%u, TP %u.%u.%u.%u", FW_HDR_FW_VER_MAJOR_GET(adapter->params.fw_vers),
drivers/net/ethernet/intel/e100.c +0 -1
@@ -2378,7 +2378,6 @@ static void e100_get_drvinfo(struct net_device *netdev,struct nic *nic =netdev_priv (netdev);strlcpy (info->driver,DRV_NAME ,sizeof (info->driver));strlcpy (info->version,DRV_VERSION ,sizeof (info->version)); -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version));strlcpy (info->bus_info,pci_name (nic->pdev),sizeof (info->bus_info)); }
drivers/net/ethernet/intel/e1000/e1000_ethtool.c +0 -1
@@ -521,7 +521,6 @@ static void e1000_get_drvinfo(struct net_device *netdev,strlcpy (drvinfo->version, e1000_driver_version,sizeof (drvinfo->version)); -strlcpy (drvinfo->fw_version,"N/A" ,sizeof (drvinfo->fw_version));strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),sizeof (drvinfo->bus_info)); drvinfo->regdump_len =e1000_get_regs_len (netdev);
drivers/net/ethernet/intel/igbvf/ethtool.c +0 -2
@@ -195,8 +195,6 @@ static void igbvf_get_drvinfo(struct net_device *netdev,strlcpy (drvinfo->driver, igbvf_driver_name,sizeof (drvinfo->driver));strlcpy (drvinfo->version, igbvf_driver_version,sizeof (drvinfo->version)); -strlcpy (drvinfo->fw_version,"N/A" , -sizeof (drvinfo->fw_version));strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),sizeof (drvinfo->bus_info)); drvinfo->regdump_len =igbvf_get_regs_len (netdev);
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c +0 -1
@@ -477,7 +477,6 @@ ixgb_get_drvinfo(struct net_device *netdev, sizeof(drvinfo->driver));strlcpy (drvinfo->version, ixgb_driver_version,sizeof (drvinfo->version)); -strlcpy (drvinfo->fw_version,"N/A" ,sizeof (drvinfo->fw_version));strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),sizeof (drvinfo->bus_info)); drvinfo->n_stats =IXGB_STATS_LEN ;
drivers/net/ethernet/intel/ixgbevf/ethtool.c +5 -5
@@ -267,11 +267,11 @@ static void ixgbevf_get_drvinfo(struct net_device *netdev, {struct ixgbevf_adapter *adapter =netdev_priv (netdev); -strlcpy (drvinfo->driver, ixgbevf_driver_name,32 ); -strlcpy (drvinfo->version, ixgbevf_driver_version,32 ); - -strlcpy (drvinfo->fw_version,"N/A" ,4 ); -strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),32 ); +strlcpy (drvinfo->driver, ixgbevf_driver_name,sizeof (drvinfo->driver)); +strlcpy (drvinfo->version, ixgbevf_driver_version, +sizeof (drvinfo->version)); +strlcpy (drvinfo->bus_info,pci_name (adapter->pdev), +sizeof (drvinfo->bus_info)); } static void ixgbevf_get_ringparam(struct net_device *netdev,
drivers/net/ethernet/marvell/skge.c +0 -1
@@ -396,7 +396,6 @@ static void skge_get_drvinfo(struct net_device *dev,strlcpy (info->driver,DRV_NAME ,sizeof (info->driver));strlcpy (info->version,DRV_VERSION ,sizeof (info->version)); -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version));strlcpy (info->bus_info,pci_name (skge->hw->pdev),sizeof (info->bus_info)); }
drivers/net/ethernet/marvell/sky2.c +0 -1
@@ -3625,7 +3625,6 @@ static void sky2_get_drvinfo(struct net_device *dev,strlcpy (info->driver,DRV_NAME ,sizeof (info->driver));strlcpy (info->version,DRV_VERSION ,sizeof (info->version)); -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version));strlcpy (info->bus_info,pci_name (sky2->hw->pdev),sizeof (info->bus_info)); }
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c +0 -1
@@ -163,7 +163,6 @@ static void pch_gbe_get_drvinfo(struct net_device *netdev,strlcpy (drvinfo->driver,KBUILD_MODNAME ,sizeof (drvinfo->driver));strlcpy (drvinfo->version, pch_driver_version,sizeof (drvinfo->version)); -strlcpy (drvinfo->fw_version,"N/A" ,sizeof (drvinfo->fw_version));strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),sizeof (drvinfo->bus_info)); drvinfo->regdump_len =pch_gbe_get_regs_len (netdev);
drivers/net/ethernet/qlogic/qla3xxx.c +0 -1
@@ -1738,7 +1738,6 @@ static void ql_get_drvinfo(struct net_device *ndev,strlcpy (drvinfo->driver, ql3xxx_driver_name,sizeof (drvinfo->driver));strlcpy (drvinfo->version, ql3xxx_driver_version,sizeof (drvinfo->version)); -strlcpy (drvinfo->fw_version,"N/A" ,sizeof (drvinfo->fw_version));strlcpy (drvinfo->bus_info,pci_name (qdev->pdev),sizeof (drvinfo->bus_info)); drvinfo->regdump_len =0 ;
drivers/net/tun.c +0 -1
@@ -1592,7 +1592,6 @@ static void tun_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *infostrlcpy (info->driver,DRV_NAME ,sizeof (info->driver));strlcpy (info->version,DRV_VERSION ,sizeof (info->version)); -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version));switch (tun->flags &TUN_TYPE_MASK ) {case TUN_TUN_DEV :
drivers/net/veth.c +0 -1
@@ -68,7 +68,6 @@ static void veth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *inf {strlcpy (info->driver,DRV_NAME ,sizeof (info->driver));strlcpy (info->version,DRV_VERSION ,sizeof (info->version)); -strlcpy (info->fw_version,"N/A" ,sizeof (info->fw_version)); }static void veth_get_strings (struct net_device *dev,u32 stringset,u8 *buf)
drivers/net/vmxnet3/vmxnet3_ethtool.c +0 -5
@@ -202,14 +202,9 @@ vmxnet3_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)struct vmxnet3_adapter *adapter =netdev_priv (netdev);strlcpy (drvinfo->driver, vmxnet3_driver_name,sizeof (drvinfo->driver)); - drvinfo->driver[sizeof (drvinfo->driver) -1 ] ='\0' ;strlcpy (drvinfo->version,VMXNET3_DRIVER_VERSION_REPORT ,sizeof (drvinfo->version)); - drvinfo->driver[sizeof (drvinfo->version) -1 ] ='\0' ; - -strlcpy (drvinfo->fw_version,"N/A" ,sizeof (drvinfo->fw_version)); - drvinfo->fw_version[sizeof (drvinfo->fw_version) -1 ] ='\0' ;strlcpy (drvinfo->bus_info,pci_name (adapter->pdev),ETHTOOL_BUSINFO_LEN );
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
From: [email protected] (Rick Jones)
Date: Mon, 21 Nov 2011 12:54:05 -0800 (PST)
Quoted 8 lines
From: Rick Jones <[email protected]>
Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to
fw_versionin various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such.Signed-off-by Rick Jones <[email protected]>
Applied, thanks Rick.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
Rick Jones <[email protected]> :
[...]
Quoted 4 lines
Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to
fw_versionin various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such.
Any reason why drivers/net/ethernet/realtek/r8169.c is left in the cold ?
Signature · 1 line
Ueimor
Quoted 9 lines · Francois Romieu
Rick Jones<[email protected]> :
[...]Quoted 4 lines
Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to
fw_versionin various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such.Any reason why
drivers/net/ethernet/realtek/r8169.cis left in the cold ?
No specific reason. I might not have caught it with my find/grep, or it might not have been built in my build environment - after I cloned net-next, I brought the .config file from my 64-bit ubuntu virtual system to the BE (been bringing it along rather like sourdough starter), did a make oldconfig, took all the defaults, did a "make" and then only modified those files for which I found the "N/A" in the .c file and which had a corresponding .o - that way I "knew" that my changes would at least be compiled subsequently and so minimizing the chances of incurring davem's wrath by sending him non-compiling code :)
rick jones
Quoted 11 lines · Rick Jones
Quoted 9 lines · Francois Romieu
Rick Jones<[email protected]> :
[...]Quoted 4 lines
Per discussion with Ben Hutchings and David Miller, go through and remove assignments of "N/A" to
fw_versionin various drivers' .get_drvinfo routines. While there clean-up some use of bare constants and such.Any reason why
drivers/net/ethernet/realtek/r8169.cis left in the cold ?
Quoted 9 lines
No specific reason. I might not have caught it with my find/grep, or it might not have been built in my build environment - after I cloned net-next, I brought the .config file from my 64-bit ubuntu virtual system to the BE (been bringing it along rather like sourdough starter), did a make oldconfig, took all the defaults, did a "make" and then only modified those files for which I found the "N/A" in the .c file and which had a corresponding .o - that way I "knew" that my changes would at least be compiled subsequently and so minimizing the chances of incurring davem's wrath by sending him non-compiling code :)
I've sent a follow-up patch under separate cover.
FWIW, there are a number of other drivers which don't seem to be enabled by the .config I'm using, so I've not done any clean-ups on those. Is there an easy way to light them all up?
rick