net: Convert some ethtool_sprintf() to ethtool_puts()

This patch converts some basic cases of ethtool_sprintf() to
ethtool_puts().

The conversions are used in cases where ethtool_sprintf() was being used
with just two arguments:
|       ethtool_sprintf(&data, buffer[i].name);
or when it's used with format string: "%s"
|       ethtool_sprintf(&data, "%s", buffer[i].name);
which both now become:
|       ethtool_puts(&data, buffer[i].name);

Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
justinstitt@google.com 2023-12-06 23:16:12 +00:00 committed by David S. Miller
parent 9b5f621cea
commit e403cffff1
28 changed files with 98 additions and 110 deletions

View File

@ -1759,7 +1759,7 @@ static void gswip_get_strings(struct dsa_switch *ds, int port, u32 stringset,
return;
for (i = 0; i < ARRAY_SIZE(gswip_rmon_cnt); i++)
ethtool_sprintf(&data, "%s", gswip_rmon_cnt[i].name);
ethtool_puts(&data, gswip_rmon_cnt[i].name);
}
static u32 gswip_bcm_ram_entry_read(struct gswip_priv *priv, u32 table,

View File

@ -836,7 +836,7 @@ mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset,
return;
for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++)
ethtool_sprintf(&data, "%s", mt7530_mib[i].name);
ethtool_puts(&data, mt7530_mib[i].name);
}
static void

View File

@ -487,7 +487,7 @@ void qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset,
return;
for (i = 0; i < priv->info->mib_count; i++)
ethtool_sprintf(&data, "%s", ar8327_mib[i].name);
ethtool_puts(&data, ar8327_mib[i].name);
}
void qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,

View File

@ -1303,7 +1303,7 @@ static void rtl8365mb_get_strings(struct dsa_switch *ds, int port, u32 stringset
for (i = 0; i < RTL8365MB_MIB_END; i++) {
struct rtl8365mb_mib_counter *mib = &rtl8365mb_mib_counters[i];
ethtool_sprintf(&data, "%s", mib->name);
ethtool_puts(&data, mib->name);
}
}

View File

@ -401,7 +401,7 @@ void rtl8366_get_strings(struct dsa_switch *ds, int port, u32 stringset,
return;
for (i = 0; i < priv->num_mib_counters; i++)
ethtool_sprintf(&data, "%s", priv->mib_counters[i].name);
ethtool_puts(&data, priv->mib_counters[i].name);
}
EXPORT_SYMBOL_GPL(rtl8366_get_strings);

View File

@ -949,7 +949,7 @@ static void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
indices[5] = ((val >> 26) & 0x1f); /* TX counter 2 */
/* The first counters is the RX octets */
ethtool_sprintf(&buf, "RxEtherStatsOctets");
ethtool_puts(&buf, "RxEtherStatsOctets");
/* Each port supports recording 3 RX counters and 3 TX counters,
* figure out what counters we use in this set-up and return the
@ -959,15 +959,15 @@ static void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
*/
for (i = 0; i < 3; i++) {
cnt = vsc73xx_find_counter(vsc, indices[i], false);
ethtool_sprintf(&buf, "%s", cnt ? cnt->name : "");
ethtool_puts(&buf, cnt ? cnt->name : "");
}
/* TX stats begins with the number of TX octets */
ethtool_sprintf(&buf, "TxEtherStatsOctets");
ethtool_puts(&buf, "TxEtherStatsOctets");
for (i = 3; i < 6; i++) {
cnt = vsc73xx_find_counter(vsc, indices[i], true);
ethtool_sprintf(&buf, "%s", cnt ? cnt->name : "");
ethtool_puts(&buf, cnt ? cnt->name : "");
}
}

View File

@ -299,13 +299,13 @@ static void ena_get_strings(struct ena_adapter *adapter,
for (i = 0; i < ENA_STATS_ARRAY_GLOBAL; i++) {
ena_stats = &ena_stats_global_strings[i];
ethtool_sprintf(&data, ena_stats->name);
ethtool_puts(&data, ena_stats->name);
}
if (eni_stats_needed) {
for (i = 0; i < ENA_STATS_ARRAY_ENI(adapter); i++) {
ena_stats = &ena_stats_eni_strings[i];
ethtool_sprintf(&data, ena_stats->name);
ethtool_puts(&data, ena_stats->name);
}
}

View File

@ -608,7 +608,7 @@ bnad_get_strings(struct net_device *netdev, u32 stringset, u8 *string)
for (i = 0; i < BNAD_ETHTOOL_STATS_NUM; i++) {
BUG_ON(!(strlen(bnad_net_stats_strings[i]) < ETH_GSTRING_LEN));
ethtool_sprintf(&string, bnad_net_stats_strings[i]);
ethtool_puts(&string, bnad_net_stats_strings[i]);
}
bmap = bna_tx_rid_mask(&bnad->bna);

View File

@ -2932,10 +2932,10 @@ static void fec_enet_get_strings(struct net_device *netdev,
switch (stringset) {
case ETH_SS_STATS:
for (i = 0; i < ARRAY_SIZE(fec_stats); i++) {
ethtool_sprintf(&data, "%s", fec_stats[i].name);
ethtool_puts(&data, fec_stats[i].name);
}
for (i = 0; i < ARRAY_SIZE(fec_xdp_stat_strs); i++) {
ethtool_sprintf(&data, "%s", fec_xdp_stat_strs[i]);
ethtool_puts(&data, fec_xdp_stat_strs[i]);
}
page_pool_ethtool_stats_get_strings(data);

View File

@ -655,7 +655,7 @@ static void fun_get_strings(struct net_device *netdev, u32 sset, u8 *data)
i);
}
for (j = 0; j < ARRAY_SIZE(txq_stat_names); j++)
ethtool_sprintf(&p, txq_stat_names[j]);
ethtool_puts(&p, txq_stat_names[j]);
for (i = 0; i < fp->num_xdpqs; i++) {
for (j = 0; j < ARRAY_SIZE(xdpq_stat_names); j++)
@ -663,7 +663,7 @@ static void fun_get_strings(struct net_device *netdev, u32 sset, u8 *data)
xdpq_stat_names[j], i);
}
for (j = 0; j < ARRAY_SIZE(xdpq_stat_names); j++)
ethtool_sprintf(&p, xdpq_stat_names[j]);
ethtool_puts(&p, xdpq_stat_names[j]);
for (i = 0; i < netdev->real_num_rx_queues; i++) {
for (j = 0; j < ARRAY_SIZE(rxq_stat_names); j++)
@ -671,10 +671,10 @@ static void fun_get_strings(struct net_device *netdev, u32 sset, u8 *data)
i);
}
for (j = 0; j < ARRAY_SIZE(rxq_stat_names); j++)
ethtool_sprintf(&p, rxq_stat_names[j]);
ethtool_puts(&p, rxq_stat_names[j]);
for (j = 0; j < ARRAY_SIZE(tls_stat_names); j++)
ethtool_sprintf(&p, tls_stat_names[j]);
ethtool_puts(&p, tls_stat_names[j]);
break;
default:
break;

View File

@ -678,7 +678,7 @@ static void hns_gmac_get_strings(u32 stringset, u8 *data)
return;
for (i = 0; i < ARRAY_SIZE(g_gmac_stats_string); i++)
ethtool_sprintf(&buff, g_gmac_stats_string[i].desc);
ethtool_puts(&buff, g_gmac_stats_string[i].desc);
}
static int hns_gmac_get_sset_count(int stringset)

View File

@ -752,7 +752,7 @@ static void hns_xgmac_get_strings(u32 stringset, u8 *data)
return;
for (i = 0; i < ARRAY_SIZE(g_xgmac_stats_string); i++)
ethtool_sprintf(&buff, g_xgmac_stats_string[i].desc);
ethtool_puts(&buff, g_xgmac_stats_string[i].desc);
}
/**

View File

@ -912,42 +912,41 @@ static void hns_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
if (stringset == ETH_SS_TEST) {
if (priv->ae_handle->phy_if != PHY_INTERFACE_MODE_XGMII)
ethtool_sprintf(&buff,
hns_nic_test_strs[MAC_INTERNALLOOP_MAC]);
ethtool_sprintf(&buff,
hns_nic_test_strs[MAC_INTERNALLOOP_SERDES]);
ethtool_puts(&buff,
hns_nic_test_strs[MAC_INTERNALLOOP_MAC]);
ethtool_puts(&buff, hns_nic_test_strs[MAC_INTERNALLOOP_SERDES]);
if ((netdev->phydev) && (!netdev->phydev->is_c45))
ethtool_sprintf(&buff,
hns_nic_test_strs[MAC_INTERNALLOOP_PHY]);
ethtool_puts(&buff,
hns_nic_test_strs[MAC_INTERNALLOOP_PHY]);
} else {
ethtool_sprintf(&buff, "rx_packets");
ethtool_sprintf(&buff, "tx_packets");
ethtool_sprintf(&buff, "rx_bytes");
ethtool_sprintf(&buff, "tx_bytes");
ethtool_sprintf(&buff, "rx_errors");
ethtool_sprintf(&buff, "tx_errors");
ethtool_sprintf(&buff, "rx_dropped");
ethtool_sprintf(&buff, "tx_dropped");
ethtool_sprintf(&buff, "multicast");
ethtool_sprintf(&buff, "collisions");
ethtool_sprintf(&buff, "rx_over_errors");
ethtool_sprintf(&buff, "rx_crc_errors");
ethtool_sprintf(&buff, "rx_frame_errors");
ethtool_sprintf(&buff, "rx_fifo_errors");
ethtool_sprintf(&buff, "rx_missed_errors");
ethtool_sprintf(&buff, "tx_aborted_errors");
ethtool_sprintf(&buff, "tx_carrier_errors");
ethtool_sprintf(&buff, "tx_fifo_errors");
ethtool_sprintf(&buff, "tx_heartbeat_errors");
ethtool_sprintf(&buff, "rx_length_errors");
ethtool_sprintf(&buff, "tx_window_errors");
ethtool_sprintf(&buff, "rx_compressed");
ethtool_sprintf(&buff, "tx_compressed");
ethtool_sprintf(&buff, "netdev_rx_dropped");
ethtool_sprintf(&buff, "netdev_tx_dropped");
ethtool_puts(&buff, "rx_packets");
ethtool_puts(&buff, "tx_packets");
ethtool_puts(&buff, "rx_bytes");
ethtool_puts(&buff, "tx_bytes");
ethtool_puts(&buff, "rx_errors");
ethtool_puts(&buff, "tx_errors");
ethtool_puts(&buff, "rx_dropped");
ethtool_puts(&buff, "tx_dropped");
ethtool_puts(&buff, "multicast");
ethtool_puts(&buff, "collisions");
ethtool_puts(&buff, "rx_over_errors");
ethtool_puts(&buff, "rx_crc_errors");
ethtool_puts(&buff, "rx_frame_errors");
ethtool_puts(&buff, "rx_fifo_errors");
ethtool_puts(&buff, "rx_missed_errors");
ethtool_puts(&buff, "tx_aborted_errors");
ethtool_puts(&buff, "tx_carrier_errors");
ethtool_puts(&buff, "tx_fifo_errors");
ethtool_puts(&buff, "tx_heartbeat_errors");
ethtool_puts(&buff, "rx_length_errors");
ethtool_puts(&buff, "tx_window_errors");
ethtool_puts(&buff, "rx_compressed");
ethtool_puts(&buff, "tx_compressed");
ethtool_puts(&buff, "netdev_rx_dropped");
ethtool_puts(&buff, "netdev_tx_dropped");
ethtool_sprintf(&buff, "netdev_tx_timeout");
ethtool_puts(&buff, "netdev_tx_timeout");
h->dev->ops->get_strings(h, stringset, buff);
}

View File

@ -2523,13 +2523,11 @@ static void i40e_get_priv_flag_strings(struct net_device *netdev, u8 *data)
u8 *p = data;
for (i = 0; i < I40E_PRIV_FLAGS_STR_LEN; i++)
ethtool_sprintf(&p, "%s",
i40e_gstrings_priv_flags[i].flag_string);
ethtool_puts(&p, i40e_gstrings_priv_flags[i].flag_string);
if (pf->hw.pf_id != 0)
return;
for (i = 0; i < I40E_GL_PRIV_FLAGS_STR_LEN; i++)
ethtool_sprintf(&p, "%s",
i40e_gl_gstrings_priv_flags[i].flag_string);
ethtool_puts(&p, i40e_gl_gstrings_priv_flags[i].flag_string);
}
static void i40e_get_strings(struct net_device *netdev, u32 stringset,

View File

@ -396,8 +396,7 @@ static void iavf_get_priv_flag_strings(struct net_device *netdev, u8 *data)
unsigned int i;
for (i = 0; i < IAVF_PRIV_FLAGS_STR_LEN; i++)
ethtool_sprintf(&data, "%s",
iavf_gstrings_priv_flags[i].flag_string);
ethtool_puts(&data, iavf_gstrings_priv_flags[i].flag_string);
}
/**

View File

@ -1142,8 +1142,7 @@ __ice_get_strings(struct net_device *netdev, u32 stringset, u8 *data,
switch (stringset) {
case ETH_SS_STATS:
for (i = 0; i < ICE_VSI_STATS_LEN; i++)
ethtool_sprintf(&p, "%s",
ice_gstrings_vsi_stats[i].stat_string);
ethtool_puts(&p, ice_gstrings_vsi_stats[i].stat_string);
if (ice_is_port_repr_netdev(netdev))
return;
@ -1162,8 +1161,7 @@ __ice_get_strings(struct net_device *netdev, u32 stringset, u8 *data,
return;
for (i = 0; i < ICE_PF_STATS_LEN; i++)
ethtool_sprintf(&p, "%s",
ice_gstrings_pf_stats[i].stat_string);
ethtool_puts(&p, ice_gstrings_pf_stats[i].stat_string);
for (i = 0; i < ICE_MAX_USER_PRIORITY; i++) {
ethtool_sprintf(&p, "tx_priority_%u_xon.nic", i);
@ -1179,8 +1177,7 @@ __ice_get_strings(struct net_device *netdev, u32 stringset, u8 *data,
break;
case ETH_SS_PRIV_FLAGS:
for (i = 0; i < ICE_PRIV_FLAG_ARRAY_SIZE; i++)
ethtool_sprintf(&p, "%s",
ice_gstrings_priv_flags[i].name);
ethtool_puts(&p, ice_gstrings_priv_flags[i].name);
break;
default:
break;

View File

@ -532,7 +532,7 @@ static void idpf_add_stat_strings(u8 **p, const struct idpf_stats *stats,
unsigned int i;
for (i = 0; i < size; i++)
ethtool_sprintf(p, "%s", stats[i].stat_string);
ethtool_puts(p, stats[i].stat_string);
}
/**

View File

@ -2356,11 +2356,9 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
break;
case ETH_SS_STATS:
for (i = 0; i < IGB_GLOBAL_STATS_LEN; i++)
ethtool_sprintf(&p, "%s",
igb_gstrings_stats[i].stat_string);
ethtool_puts(&p, igb_gstrings_stats[i].stat_string);
for (i = 0; i < IGB_NETDEV_STATS_LEN; i++)
ethtool_sprintf(&p, "%s",
igb_gstrings_net_stats[i].stat_string);
ethtool_puts(&p, igb_gstrings_net_stats[i].stat_string);
for (i = 0; i < adapter->num_tx_queues; i++) {
ethtool_sprintf(&p, "tx_queue_%u_packets", i);
ethtool_sprintf(&p, "tx_queue_%u_bytes", i);

View File

@ -773,11 +773,9 @@ static void igc_ethtool_get_strings(struct net_device *netdev, u32 stringset,
break;
case ETH_SS_STATS:
for (i = 0; i < IGC_GLOBAL_STATS_LEN; i++)
ethtool_sprintf(&p, "%s",
igc_gstrings_stats[i].stat_string);
ethtool_puts(&p, igc_gstrings_stats[i].stat_string);
for (i = 0; i < IGC_NETDEV_STATS_LEN; i++)
ethtool_sprintf(&p, "%s",
igc_gstrings_net_stats[i].stat_string);
ethtool_puts(&p, igc_gstrings_net_stats[i].stat_string);
for (i = 0; i < adapter->num_tx_queues; i++) {
ethtool_sprintf(&p, "tx_queue_%u_packets", i);
ethtool_sprintf(&p, "tx_queue_%u_bytes", i);

View File

@ -1413,12 +1413,11 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
switch (stringset) {
case ETH_SS_TEST:
for (i = 0; i < IXGBE_TEST_LEN; i++)
ethtool_sprintf(&p, "%s", ixgbe_gstrings_test[i]);
ethtool_puts(&p, ixgbe_gstrings_test[i]);
break;
case ETH_SS_STATS:
for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++)
ethtool_sprintf(&p, "%s",
ixgbe_gstrings_stats[i].stat_string);
ethtool_puts(&p, ixgbe_gstrings_stats[i].stat_string);
for (i = 0; i < netdev->num_tx_queues; i++) {
ethtool_sprintf(&p, "tx_queue_%u_packets", i);
ethtool_sprintf(&p, "tx_queue_%u_bytes", i);

View File

@ -1012,7 +1012,7 @@ static void sparx5_get_sset_strings(struct net_device *ndev, u32 sset, u8 *data)
return;
for (idx = 0; idx < sparx5->num_ethtool_stats; idx++)
ethtool_sprintf(&data, "%s", sparx5->stats_layout[idx]);
ethtool_puts(&data, sparx5->stats_layout[idx]);
}
static void sparx5_get_sset_data(struct net_device *ndev,

View File

@ -807,7 +807,7 @@ static void nfp_get_self_test_strings(struct net_device *netdev, u8 *data)
for (i = 0; i < NFP_TEST_TOTAL_NUM; i++)
if (nfp_self_test[i].is_supported(netdev))
ethtool_sprintf(&data, nfp_self_test[i].name);
ethtool_puts(&data, nfp_self_test[i].name);
}
static int nfp_get_self_test_count(struct net_device *netdev)
@ -859,24 +859,24 @@ static u8 *nfp_vnic_get_sw_stats_strings(struct net_device *netdev, u8 *data)
ethtool_sprintf(&data, "rvec_%u_tx_busy", i);
}
ethtool_sprintf(&data, "hw_rx_csum_ok");
ethtool_sprintf(&data, "hw_rx_csum_inner_ok");
ethtool_sprintf(&data, "hw_rx_csum_complete");
ethtool_sprintf(&data, "hw_rx_csum_err");
ethtool_sprintf(&data, "rx_replace_buf_alloc_fail");
ethtool_sprintf(&data, "rx_tls_decrypted_packets");
ethtool_sprintf(&data, "hw_tx_csum");
ethtool_sprintf(&data, "hw_tx_inner_csum");
ethtool_sprintf(&data, "tx_gather");
ethtool_sprintf(&data, "tx_lso");
ethtool_sprintf(&data, "tx_tls_encrypted_packets");
ethtool_sprintf(&data, "tx_tls_ooo");
ethtool_sprintf(&data, "tx_tls_drop_no_sync_data");
ethtool_puts(&data, "hw_rx_csum_ok");
ethtool_puts(&data, "hw_rx_csum_inner_ok");
ethtool_puts(&data, "hw_rx_csum_complete");
ethtool_puts(&data, "hw_rx_csum_err");
ethtool_puts(&data, "rx_replace_buf_alloc_fail");
ethtool_puts(&data, "rx_tls_decrypted_packets");
ethtool_puts(&data, "hw_tx_csum");
ethtool_puts(&data, "hw_tx_inner_csum");
ethtool_puts(&data, "tx_gather");
ethtool_puts(&data, "tx_lso");
ethtool_puts(&data, "tx_tls_encrypted_packets");
ethtool_puts(&data, "tx_tls_ooo");
ethtool_puts(&data, "tx_tls_drop_no_sync_data");
ethtool_sprintf(&data, "hw_tls_no_space");
ethtool_sprintf(&data, "rx_tls_resync_req_ok");
ethtool_sprintf(&data, "rx_tls_resync_req_ign");
ethtool_sprintf(&data, "rx_tls_resync_sent");
ethtool_puts(&data, "hw_tls_no_space");
ethtool_puts(&data, "rx_tls_resync_req_ok");
ethtool_puts(&data, "rx_tls_resync_req_ign");
ethtool_puts(&data, "rx_tls_resync_sent");
return data;
}
@ -950,13 +950,13 @@ nfp_vnic_get_hw_stats_strings(u8 *data, unsigned int num_vecs, bool repr)
swap_off = repr * NN_ET_SWITCH_STATS_LEN;
for (i = 0; i < NN_ET_SWITCH_STATS_LEN; i++)
ethtool_sprintf(&data, nfp_net_et_stats[i + swap_off].name);
ethtool_puts(&data, nfp_net_et_stats[i + swap_off].name);
for (i = NN_ET_SWITCH_STATS_LEN; i < NN_ET_SWITCH_STATS_LEN * 2; i++)
ethtool_sprintf(&data, nfp_net_et_stats[i - swap_off].name);
ethtool_puts(&data, nfp_net_et_stats[i - swap_off].name);
for (i = NN_ET_SWITCH_STATS_LEN * 2; i < NN_ET_GLOBAL_STATS_LEN; i++)
ethtool_sprintf(&data, nfp_net_et_stats[i].name);
ethtool_puts(&data, nfp_net_et_stats[i].name);
for (i = 0; i < num_vecs; i++) {
ethtool_sprintf(&data, "rxq_%u_pkts", i);

View File

@ -258,10 +258,10 @@ static void ionic_sw_stats_get_strings(struct ionic_lif *lif, u8 **buf)
int i, q_num;
for (i = 0; i < IONIC_NUM_LIF_STATS; i++)
ethtool_sprintf(buf, ionic_lif_stats_desc[i].name);
ethtool_puts(buf, ionic_lif_stats_desc[i].name);
for (i = 0; i < IONIC_NUM_PORT_STATS; i++)
ethtool_sprintf(buf, ionic_port_stats_desc[i].name);
ethtool_puts(buf, ionic_port_stats_desc[i].name);
for (q_num = 0; q_num < MAX_Q(lif); q_num++)
ionic_sw_stats_get_tx_strings(lif, buf, q_num);

View File

@ -75,7 +75,7 @@ void wx_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
switch (stringset) {
case ETH_SS_STATS:
for (i = 0; i < WX_GLOBAL_STATS_LEN; i++)
ethtool_sprintf(&p, wx_gstrings_stats[i].stat_string);
ethtool_puts(&p, wx_gstrings_stats[i].stat_string);
for (i = 0; i < netdev->num_tx_queues; i++) {
ethtool_sprintf(&p, "tx_queue_%u_packets", i);
ethtool_sprintf(&p, "tx_queue_%u_bytes", i);

View File

@ -1582,10 +1582,10 @@ static void netvsc_get_strings(struct net_device *dev, u32 stringset, u8 *data)
switch (stringset) {
case ETH_SS_STATS:
for (i = 0; i < ARRAY_SIZE(netvsc_stats); i++)
ethtool_sprintf(&p, netvsc_stats[i].name);
ethtool_puts(&p, netvsc_stats[i].name);
for (i = 0; i < ARRAY_SIZE(vf_stats); i++)
ethtool_sprintf(&p, vf_stats[i].name);
ethtool_puts(&p, vf_stats[i].name);
for (i = 0; i < nvdev->num_chn; i++) {
ethtool_sprintf(&p, "tx_queue_%u_packets", i);

View File

@ -415,7 +415,7 @@ static void tja11xx_get_strings(struct phy_device *phydev, u8 *data)
int i;
for (i = 0; i < ARRAY_SIZE(tja11xx_hw_stats); i++)
ethtool_sprintf(&data, "%s", tja11xx_hw_stats[i].string);
ethtool_puts(&data, tja11xx_hw_stats[i].string);
}
static void tja11xx_get_stats(struct phy_device *phydev,

View File

@ -508,7 +508,7 @@ static void smsc_get_strings(struct phy_device *phydev, u8 *data)
int i;
for (i = 0; i < ARRAY_SIZE(smsc_hw_stats); i++)
ethtool_sprintf(&data, "%s", smsc_hw_stats[i].string);
ethtool_puts(&data, smsc_hw_stats[i].string);
}
static u64 smsc_get_stat(struct phy_device *phydev, int i)

View File

@ -245,20 +245,20 @@ vmxnet3_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
for (j = 0; j < adapter->num_tx_queues; j++) {
for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_dev_stats); i++)
ethtool_sprintf(&buf, vmxnet3_tq_dev_stats[i].desc);
ethtool_puts(&buf, vmxnet3_tq_dev_stats[i].desc);
for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_driver_stats); i++)
ethtool_sprintf(&buf, vmxnet3_tq_driver_stats[i].desc);
ethtool_puts(&buf, vmxnet3_tq_driver_stats[i].desc);
}
for (j = 0; j < adapter->num_rx_queues; j++) {
for (i = 0; i < ARRAY_SIZE(vmxnet3_rq_dev_stats); i++)
ethtool_sprintf(&buf, vmxnet3_rq_dev_stats[i].desc);
ethtool_puts(&buf, vmxnet3_rq_dev_stats[i].desc);
for (i = 0; i < ARRAY_SIZE(vmxnet3_rq_driver_stats); i++)
ethtool_sprintf(&buf, vmxnet3_rq_driver_stats[i].desc);
ethtool_puts(&buf, vmxnet3_rq_driver_stats[i].desc);
}
for (i = 0; i < ARRAY_SIZE(vmxnet3_global_stats); i++)
ethtool_sprintf(&buf, vmxnet3_global_stats[i].desc);
ethtool_puts(&buf, vmxnet3_global_stats[i].desc);
}
netdev_features_t vmxnet3_fix_features(struct net_device *netdev,