Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of...
authorRick Jones <rick.jones2@hp.com>
Mon, 21 Nov 2011 10:54:05 +0000 (10:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Nov 2011 21:43:32 +0000 (16:43 -0500)
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.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c
drivers/net/ethernet/atheros/atlx/atl1.c
drivers/net/ethernet/chelsio/cxgb/cxgb2.c
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/intel/e100.c
drivers/net/ethernet/intel/e1000/e1000_ethtool.c
drivers/net/ethernet/intel/igbvf/ethtool.c
drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c
drivers/net/ethernet/intel/ixgbevf/ethtool.c
drivers/net/ethernet/marvell/skge.c
drivers/net/ethernet/marvell/sky2.c
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c
drivers/net/ethernet/qlogic/qla3xxx.c
drivers/net/tun.c
drivers/net/veth.c
drivers/net/vmxnet3/vmxnet3_ethtool.c

index 7be884d0aaf6e36464a5908aefdd29c12a2dadab..0a9326aa58b5b4a8e3f4730eedbc1f395651b4ba 100644 (file)
@@ -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;
index 33a4e35f5ee822a5b1377084dea4c6cc7ae5ba84..9bd2049766480331e6a0f3355ac84174a822e9d5 100644 (file)
@@ -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;
index a971796b2262a8040f2400699a0f2a2d334e6efc..1d17c92f2dda175547ec107a599fa8f42b37ce5d 100644 (file)
@@ -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));
 }
index 63ffaa7e255f43e9dd82e9bfa168acc1fbac0281..857cc254cab8795362dc07373631aae04d404b6b 100644 (file)
@@ -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)
index fd6d460ea47522dc4b8011e8350648bbb0586562..a34e7ce7e21453909b18835e3006d437f8de06ed 100644 (file)
@@ -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),
index 46003278ffa0be85db7a05a29c226e53651da3c2..9436397e5725ecd6efdd735ac579ff9fa268e131 100644 (file)
@@ -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));
 }
index 63faec693deb37b14c3b27b5067151930ebad3fd..3103f0b6bf5ef02d0e6a980a2fbd4806a897e7d3 100644 (file)
@@ -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);
index e60f1c6957af9396679b40d67489573c732bacd6..7b600a1f6366f811d31ae38fd12cab1c6d452505 100644 (file)
@@ -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);
index 96fcb0e064503644cdb4affb4377d1e0c8eff247..dbb7dd2f8e360e4d6c1013182e9d667a19d7fa56 100644 (file)
@@ -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;
index 149fa520d7f2100dbb91e7bde9fe602e9f7df593..dc8e6511c64068debdb4cec9887b321e348a9ea9 100644 (file)
@@ -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,
index 3943f5f7bb4a429829ba8f9a38e088d38cc83f3e..d957b2cf0869aa4ff4e169a67412e1cd793ad943 100644 (file)
@@ -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));
 }
index ca33908bc7f3337ac34a2a5d0dd8aa6277d190a1..29adc7850ee4c3898058fc5a45cbec95ef4ef230 100644 (file)
@@ -3645,7 +3645,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));
 }
index 0063194adb9e048bde7e57f8a32f2718d2768ede..ac4e72d529e5360aef0ffd9f7a1353f222a1aa0c 100644 (file)
@@ -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);
index 9416f297100e1a7c0feed05fa793f5fef1aca9b3..7931531c3a40be12f1d4f838fd854878c16b9470 100644 (file)
@@ -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;
index 3dd13d606d00e02e499c9092ec30bfafb2338530..93c5d72711b023be9623e85b3fc9044d50cfef59 100644 (file)
@@ -1592,7 +1592,6 @@ static void tun_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));
 
        switch (tun->flags & TUN_TYPE_MASK) {
        case TUN_TUN_DEV:
index b576812bdc5931d7852d2bc1629d65c1bdee7c6c..49f4667e1fa3c20342b1ca18240a93ece55f9016 100644 (file)
@@ -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)
index 77f723415c9c747fcfffd1ac18ceb4f948230bfb..b492ee1e5f17d16dfa7bfbb70f291c076b87ca69 100644 (file)
@@ -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);