Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

justinstitt@google.com and committed by
David S. Miller
e403cfff 9b5f621c

+98 -110
+1 -1
drivers/net/dsa/lantiq_gswip.c
··· 1759 1759 return; 1760 1760 1761 1761 for (i = 0; i < ARRAY_SIZE(gswip_rmon_cnt); i++) 1762 - ethtool_sprintf(&data, "%s", gswip_rmon_cnt[i].name); 1762 + ethtool_puts(&data, gswip_rmon_cnt[i].name); 1763 1763 } 1764 1764 1765 1765 static u32 gswip_bcm_ram_entry_read(struct gswip_priv *priv, u32 table,
+1 -1
drivers/net/dsa/mt7530.c
··· 836 836 return; 837 837 838 838 for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++) 839 - ethtool_sprintf(&data, "%s", mt7530_mib[i].name); 839 + ethtool_puts(&data, mt7530_mib[i].name); 840 840 } 841 841 842 842 static void
+1 -1
drivers/net/dsa/qca/qca8k-common.c
··· 487 487 return; 488 488 489 489 for (i = 0; i < priv->info->mib_count; i++) 490 - ethtool_sprintf(&data, "%s", ar8327_mib[i].name); 490 + ethtool_puts(&data, ar8327_mib[i].name); 491 491 } 492 492 493 493 void qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
+1 -1
drivers/net/dsa/realtek/rtl8365mb.c
··· 1303 1303 1304 1304 for (i = 0; i < RTL8365MB_MIB_END; i++) { 1305 1305 struct rtl8365mb_mib_counter *mib = &rtl8365mb_mib_counters[i]; 1306 - ethtool_sprintf(&data, "%s", mib->name); 1306 + ethtool_puts(&data, mib->name); 1307 1307 } 1308 1308 } 1309 1309
+1 -1
drivers/net/dsa/realtek/rtl8366-core.c
··· 401 401 return; 402 402 403 403 for (i = 0; i < priv->num_mib_counters; i++) 404 - ethtool_sprintf(&data, "%s", priv->mib_counters[i].name); 404 + ethtool_puts(&data, priv->mib_counters[i].name); 405 405 } 406 406 EXPORT_SYMBOL_GPL(rtl8366_get_strings); 407 407
+4 -4
drivers/net/dsa/vitesse-vsc73xx-core.c
··· 949 949 indices[5] = ((val >> 26) & 0x1f); /* TX counter 2 */ 950 950 951 951 /* The first counters is the RX octets */ 952 - ethtool_sprintf(&buf, "RxEtherStatsOctets"); 952 + ethtool_puts(&buf, "RxEtherStatsOctets"); 953 953 954 954 /* Each port supports recording 3 RX counters and 3 TX counters, 955 955 * figure out what counters we use in this set-up and return the ··· 959 959 */ 960 960 for (i = 0; i < 3; i++) { 961 961 cnt = vsc73xx_find_counter(vsc, indices[i], false); 962 - ethtool_sprintf(&buf, "%s", cnt ? cnt->name : ""); 962 + ethtool_puts(&buf, cnt ? cnt->name : ""); 963 963 } 964 964 965 965 /* TX stats begins with the number of TX octets */ 966 - ethtool_sprintf(&buf, "TxEtherStatsOctets"); 966 + ethtool_puts(&buf, "TxEtherStatsOctets"); 967 967 968 968 for (i = 3; i < 6; i++) { 969 969 cnt = vsc73xx_find_counter(vsc, indices[i], true); 970 - ethtool_sprintf(&buf, "%s", cnt ? cnt->name : ""); 970 + ethtool_puts(&buf, cnt ? cnt->name : ""); 971 971 972 972 } 973 973 }
+2 -2
drivers/net/ethernet/amazon/ena/ena_ethtool.c
··· 299 299 300 300 for (i = 0; i < ENA_STATS_ARRAY_GLOBAL; i++) { 301 301 ena_stats = &ena_stats_global_strings[i]; 302 - ethtool_sprintf(&data, ena_stats->name); 302 + ethtool_puts(&data, ena_stats->name); 303 303 } 304 304 305 305 if (eni_stats_needed) { 306 306 for (i = 0; i < ENA_STATS_ARRAY_ENI(adapter); i++) { 307 307 ena_stats = &ena_stats_eni_strings[i]; 308 - ethtool_sprintf(&data, ena_stats->name); 308 + ethtool_puts(&data, ena_stats->name); 309 309 } 310 310 } 311 311
+1 -1
drivers/net/ethernet/brocade/bna/bnad_ethtool.c
··· 608 608 609 609 for (i = 0; i < BNAD_ETHTOOL_STATS_NUM; i++) { 610 610 BUG_ON(!(strlen(bnad_net_stats_strings[i]) < ETH_GSTRING_LEN)); 611 - ethtool_sprintf(&string, bnad_net_stats_strings[i]); 611 + ethtool_puts(&string, bnad_net_stats_strings[i]); 612 612 } 613 613 614 614 bmap = bna_tx_rid_mask(&bnad->bna);
+2 -2
drivers/net/ethernet/freescale/fec_main.c
··· 2932 2932 switch (stringset) { 2933 2933 case ETH_SS_STATS: 2934 2934 for (i = 0; i < ARRAY_SIZE(fec_stats); i++) { 2935 - ethtool_sprintf(&data, "%s", fec_stats[i].name); 2935 + ethtool_puts(&data, fec_stats[i].name); 2936 2936 } 2937 2937 for (i = 0; i < ARRAY_SIZE(fec_xdp_stat_strs); i++) { 2938 - ethtool_sprintf(&data, "%s", fec_xdp_stat_strs[i]); 2938 + ethtool_puts(&data, fec_xdp_stat_strs[i]); 2939 2939 } 2940 2940 page_pool_ethtool_stats_get_strings(data); 2941 2941
+4 -4
drivers/net/ethernet/fungible/funeth/funeth_ethtool.c
··· 655 655 i); 656 656 } 657 657 for (j = 0; j < ARRAY_SIZE(txq_stat_names); j++) 658 - ethtool_sprintf(&p, txq_stat_names[j]); 658 + ethtool_puts(&p, txq_stat_names[j]); 659 659 660 660 for (i = 0; i < fp->num_xdpqs; i++) { 661 661 for (j = 0; j < ARRAY_SIZE(xdpq_stat_names); j++) ··· 663 663 xdpq_stat_names[j], i); 664 664 } 665 665 for (j = 0; j < ARRAY_SIZE(xdpq_stat_names); j++) 666 - ethtool_sprintf(&p, xdpq_stat_names[j]); 666 + ethtool_puts(&p, xdpq_stat_names[j]); 667 667 668 668 for (i = 0; i < netdev->real_num_rx_queues; i++) { 669 669 for (j = 0; j < ARRAY_SIZE(rxq_stat_names); j++) ··· 671 671 i); 672 672 } 673 673 for (j = 0; j < ARRAY_SIZE(rxq_stat_names); j++) 674 - ethtool_sprintf(&p, rxq_stat_names[j]); 674 + ethtool_puts(&p, rxq_stat_names[j]); 675 675 676 676 for (j = 0; j < ARRAY_SIZE(tls_stat_names); j++) 677 - ethtool_sprintf(&p, tls_stat_names[j]); 677 + ethtool_puts(&p, tls_stat_names[j]); 678 678 break; 679 679 default: 680 680 break;
+1 -1
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
··· 678 678 return; 679 679 680 680 for (i = 0; i < ARRAY_SIZE(g_gmac_stats_string); i++) 681 - ethtool_sprintf(&buff, g_gmac_stats_string[i].desc); 681 + ethtool_puts(&buff, g_gmac_stats_string[i].desc); 682 682 } 683 683 684 684 static int hns_gmac_get_sset_count(int stringset)
+1 -1
drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c
··· 752 752 return; 753 753 754 754 for (i = 0; i < ARRAY_SIZE(g_xgmac_stats_string); i++) 755 - ethtool_sprintf(&buff, g_xgmac_stats_string[i].desc); 755 + ethtool_puts(&buff, g_xgmac_stats_string[i].desc); 756 756 } 757 757 758 758 /**
+31 -32
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
··· 912 912 913 913 if (stringset == ETH_SS_TEST) { 914 914 if (priv->ae_handle->phy_if != PHY_INTERFACE_MODE_XGMII) 915 - ethtool_sprintf(&buff, 916 - hns_nic_test_strs[MAC_INTERNALLOOP_MAC]); 917 - ethtool_sprintf(&buff, 918 - hns_nic_test_strs[MAC_INTERNALLOOP_SERDES]); 915 + ethtool_puts(&buff, 916 + hns_nic_test_strs[MAC_INTERNALLOOP_MAC]); 917 + ethtool_puts(&buff, hns_nic_test_strs[MAC_INTERNALLOOP_SERDES]); 919 918 if ((netdev->phydev) && (!netdev->phydev->is_c45)) 920 - ethtool_sprintf(&buff, 921 - hns_nic_test_strs[MAC_INTERNALLOOP_PHY]); 919 + ethtool_puts(&buff, 920 + hns_nic_test_strs[MAC_INTERNALLOOP_PHY]); 922 921 923 922 } else { 924 - ethtool_sprintf(&buff, "rx_packets"); 925 - ethtool_sprintf(&buff, "tx_packets"); 926 - ethtool_sprintf(&buff, "rx_bytes"); 927 - ethtool_sprintf(&buff, "tx_bytes"); 928 - ethtool_sprintf(&buff, "rx_errors"); 929 - ethtool_sprintf(&buff, "tx_errors"); 930 - ethtool_sprintf(&buff, "rx_dropped"); 931 - ethtool_sprintf(&buff, "tx_dropped"); 932 - ethtool_sprintf(&buff, "multicast"); 933 - ethtool_sprintf(&buff, "collisions"); 934 - ethtool_sprintf(&buff, "rx_over_errors"); 935 - ethtool_sprintf(&buff, "rx_crc_errors"); 936 - ethtool_sprintf(&buff, "rx_frame_errors"); 937 - ethtool_sprintf(&buff, "rx_fifo_errors"); 938 - ethtool_sprintf(&buff, "rx_missed_errors"); 939 - ethtool_sprintf(&buff, "tx_aborted_errors"); 940 - ethtool_sprintf(&buff, "tx_carrier_errors"); 941 - ethtool_sprintf(&buff, "tx_fifo_errors"); 942 - ethtool_sprintf(&buff, "tx_heartbeat_errors"); 943 - ethtool_sprintf(&buff, "rx_length_errors"); 944 - ethtool_sprintf(&buff, "tx_window_errors"); 945 - ethtool_sprintf(&buff, "rx_compressed"); 946 - ethtool_sprintf(&buff, "tx_compressed"); 947 - ethtool_sprintf(&buff, "netdev_rx_dropped"); 948 - ethtool_sprintf(&buff, "netdev_tx_dropped"); 923 + ethtool_puts(&buff, "rx_packets"); 924 + ethtool_puts(&buff, "tx_packets"); 925 + ethtool_puts(&buff, "rx_bytes"); 926 + ethtool_puts(&buff, "tx_bytes"); 927 + ethtool_puts(&buff, "rx_errors"); 928 + ethtool_puts(&buff, "tx_errors"); 929 + ethtool_puts(&buff, "rx_dropped"); 930 + ethtool_puts(&buff, "tx_dropped"); 931 + ethtool_puts(&buff, "multicast"); 932 + ethtool_puts(&buff, "collisions"); 933 + ethtool_puts(&buff, "rx_over_errors"); 934 + ethtool_puts(&buff, "rx_crc_errors"); 935 + ethtool_puts(&buff, "rx_frame_errors"); 936 + ethtool_puts(&buff, "rx_fifo_errors"); 937 + ethtool_puts(&buff, "rx_missed_errors"); 938 + ethtool_puts(&buff, "tx_aborted_errors"); 939 + ethtool_puts(&buff, "tx_carrier_errors"); 940 + ethtool_puts(&buff, "tx_fifo_errors"); 941 + ethtool_puts(&buff, "tx_heartbeat_errors"); 942 + ethtool_puts(&buff, "rx_length_errors"); 943 + ethtool_puts(&buff, "tx_window_errors"); 944 + ethtool_puts(&buff, "rx_compressed"); 945 + ethtool_puts(&buff, "tx_compressed"); 946 + ethtool_puts(&buff, "netdev_rx_dropped"); 947 + ethtool_puts(&buff, "netdev_tx_dropped"); 949 948 950 - ethtool_sprintf(&buff, "netdev_tx_timeout"); 949 + ethtool_puts(&buff, "netdev_tx_timeout"); 951 950 952 951 h->dev->ops->get_strings(h, stringset, buff); 953 952 }
+2 -4
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
··· 2523 2523 u8 *p = data; 2524 2524 2525 2525 for (i = 0; i < I40E_PRIV_FLAGS_STR_LEN; i++) 2526 - ethtool_sprintf(&p, "%s", 2527 - i40e_gstrings_priv_flags[i].flag_string); 2526 + ethtool_puts(&p, i40e_gstrings_priv_flags[i].flag_string); 2528 2527 if (pf->hw.pf_id != 0) 2529 2528 return; 2530 2529 for (i = 0; i < I40E_GL_PRIV_FLAGS_STR_LEN; i++) 2531 - ethtool_sprintf(&p, "%s", 2532 - i40e_gl_gstrings_priv_flags[i].flag_string); 2530 + ethtool_puts(&p, i40e_gl_gstrings_priv_flags[i].flag_string); 2533 2531 } 2534 2532 2535 2533 static void i40e_get_strings(struct net_device *netdev, u32 stringset,
+1 -2
drivers/net/ethernet/intel/iavf/iavf_ethtool.c
··· 396 396 unsigned int i; 397 397 398 398 for (i = 0; i < IAVF_PRIV_FLAGS_STR_LEN; i++) 399 - ethtool_sprintf(&data, "%s", 400 - iavf_gstrings_priv_flags[i].flag_string); 399 + ethtool_puts(&data, iavf_gstrings_priv_flags[i].flag_string); 401 400 } 402 401 403 402 /**
+3 -6
drivers/net/ethernet/intel/ice/ice_ethtool.c
··· 1142 1142 switch (stringset) { 1143 1143 case ETH_SS_STATS: 1144 1144 for (i = 0; i < ICE_VSI_STATS_LEN; i++) 1145 - ethtool_sprintf(&p, "%s", 1146 - ice_gstrings_vsi_stats[i].stat_string); 1145 + ethtool_puts(&p, ice_gstrings_vsi_stats[i].stat_string); 1147 1146 1148 1147 if (ice_is_port_repr_netdev(netdev)) 1149 1148 return; ··· 1161 1162 return; 1162 1163 1163 1164 for (i = 0; i < ICE_PF_STATS_LEN; i++) 1164 - ethtool_sprintf(&p, "%s", 1165 - ice_gstrings_pf_stats[i].stat_string); 1165 + ethtool_puts(&p, ice_gstrings_pf_stats[i].stat_string); 1166 1166 1167 1167 for (i = 0; i < ICE_MAX_USER_PRIORITY; i++) { 1168 1168 ethtool_sprintf(&p, "tx_priority_%u_xon.nic", i); ··· 1177 1179 break; 1178 1180 case ETH_SS_PRIV_FLAGS: 1179 1181 for (i = 0; i < ICE_PRIV_FLAG_ARRAY_SIZE; i++) 1180 - ethtool_sprintf(&p, "%s", 1181 - ice_gstrings_priv_flags[i].name); 1182 + ethtool_puts(&p, ice_gstrings_priv_flags[i].name); 1182 1183 break; 1183 1184 default: 1184 1185 break;
+1 -1
drivers/net/ethernet/intel/idpf/idpf_ethtool.c
··· 532 532 unsigned int i; 533 533 534 534 for (i = 0; i < size; i++) 535 - ethtool_sprintf(p, "%s", stats[i].stat_string); 535 + ethtool_puts(p, stats[i].stat_string); 536 536 } 537 537 538 538 /**
+2 -4
drivers/net/ethernet/intel/igb/igb_ethtool.c
··· 2356 2356 break; 2357 2357 case ETH_SS_STATS: 2358 2358 for (i = 0; i < IGB_GLOBAL_STATS_LEN; i++) 2359 - ethtool_sprintf(&p, "%s", 2360 - igb_gstrings_stats[i].stat_string); 2359 + ethtool_puts(&p, igb_gstrings_stats[i].stat_string); 2361 2360 for (i = 0; i < IGB_NETDEV_STATS_LEN; i++) 2362 - ethtool_sprintf(&p, "%s", 2363 - igb_gstrings_net_stats[i].stat_string); 2361 + ethtool_puts(&p, igb_gstrings_net_stats[i].stat_string); 2364 2362 for (i = 0; i < adapter->num_tx_queues; i++) { 2365 2363 ethtool_sprintf(&p, "tx_queue_%u_packets", i); 2366 2364 ethtool_sprintf(&p, "tx_queue_%u_bytes", i);
+2 -4
drivers/net/ethernet/intel/igc/igc_ethtool.c
··· 773 773 break; 774 774 case ETH_SS_STATS: 775 775 for (i = 0; i < IGC_GLOBAL_STATS_LEN; i++) 776 - ethtool_sprintf(&p, "%s", 777 - igc_gstrings_stats[i].stat_string); 776 + ethtool_puts(&p, igc_gstrings_stats[i].stat_string); 778 777 for (i = 0; i < IGC_NETDEV_STATS_LEN; i++) 779 - ethtool_sprintf(&p, "%s", 780 - igc_gstrings_net_stats[i].stat_string); 778 + ethtool_puts(&p, igc_gstrings_net_stats[i].stat_string); 781 779 for (i = 0; i < adapter->num_tx_queues; i++) { 782 780 ethtool_sprintf(&p, "tx_queue_%u_packets", i); 783 781 ethtool_sprintf(&p, "tx_queue_%u_bytes", i);
+2 -3
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
··· 1413 1413 switch (stringset) { 1414 1414 case ETH_SS_TEST: 1415 1415 for (i = 0; i < IXGBE_TEST_LEN; i++) 1416 - ethtool_sprintf(&p, "%s", ixgbe_gstrings_test[i]); 1416 + ethtool_puts(&p, ixgbe_gstrings_test[i]); 1417 1417 break; 1418 1418 case ETH_SS_STATS: 1419 1419 for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) 1420 - ethtool_sprintf(&p, "%s", 1421 - ixgbe_gstrings_stats[i].stat_string); 1420 + ethtool_puts(&p, ixgbe_gstrings_stats[i].stat_string); 1422 1421 for (i = 0; i < netdev->num_tx_queues; i++) { 1423 1422 ethtool_sprintf(&p, "tx_queue_%u_packets", i); 1424 1423 ethtool_sprintf(&p, "tx_queue_%u_bytes", i);
+1 -1
drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c
··· 1012 1012 return; 1013 1013 1014 1014 for (idx = 0; idx < sparx5->num_ethtool_stats; idx++) 1015 - ethtool_sprintf(&data, "%s", sparx5->stats_layout[idx]); 1015 + ethtool_puts(&data, sparx5->stats_layout[idx]); 1016 1016 } 1017 1017 1018 1018 static void sparx5_get_sset_data(struct net_device *ndev,
+21 -21
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
··· 807 807 808 808 for (i = 0; i < NFP_TEST_TOTAL_NUM; i++) 809 809 if (nfp_self_test[i].is_supported(netdev)) 810 - ethtool_sprintf(&data, nfp_self_test[i].name); 810 + ethtool_puts(&data, nfp_self_test[i].name); 811 811 } 812 812 813 813 static int nfp_get_self_test_count(struct net_device *netdev) ··· 859 859 ethtool_sprintf(&data, "rvec_%u_tx_busy", i); 860 860 } 861 861 862 - ethtool_sprintf(&data, "hw_rx_csum_ok"); 863 - ethtool_sprintf(&data, "hw_rx_csum_inner_ok"); 864 - ethtool_sprintf(&data, "hw_rx_csum_complete"); 865 - ethtool_sprintf(&data, "hw_rx_csum_err"); 866 - ethtool_sprintf(&data, "rx_replace_buf_alloc_fail"); 867 - ethtool_sprintf(&data, "rx_tls_decrypted_packets"); 868 - ethtool_sprintf(&data, "hw_tx_csum"); 869 - ethtool_sprintf(&data, "hw_tx_inner_csum"); 870 - ethtool_sprintf(&data, "tx_gather"); 871 - ethtool_sprintf(&data, "tx_lso"); 872 - ethtool_sprintf(&data, "tx_tls_encrypted_packets"); 873 - ethtool_sprintf(&data, "tx_tls_ooo"); 874 - ethtool_sprintf(&data, "tx_tls_drop_no_sync_data"); 862 + ethtool_puts(&data, "hw_rx_csum_ok"); 863 + ethtool_puts(&data, "hw_rx_csum_inner_ok"); 864 + ethtool_puts(&data, "hw_rx_csum_complete"); 865 + ethtool_puts(&data, "hw_rx_csum_err"); 866 + ethtool_puts(&data, "rx_replace_buf_alloc_fail"); 867 + ethtool_puts(&data, "rx_tls_decrypted_packets"); 868 + ethtool_puts(&data, "hw_tx_csum"); 869 + ethtool_puts(&data, "hw_tx_inner_csum"); 870 + ethtool_puts(&data, "tx_gather"); 871 + ethtool_puts(&data, "tx_lso"); 872 + ethtool_puts(&data, "tx_tls_encrypted_packets"); 873 + ethtool_puts(&data, "tx_tls_ooo"); 874 + ethtool_puts(&data, "tx_tls_drop_no_sync_data"); 875 875 876 - ethtool_sprintf(&data, "hw_tls_no_space"); 877 - ethtool_sprintf(&data, "rx_tls_resync_req_ok"); 878 - ethtool_sprintf(&data, "rx_tls_resync_req_ign"); 879 - ethtool_sprintf(&data, "rx_tls_resync_sent"); 876 + ethtool_puts(&data, "hw_tls_no_space"); 877 + ethtool_puts(&data, "rx_tls_resync_req_ok"); 878 + ethtool_puts(&data, "rx_tls_resync_req_ign"); 879 + ethtool_puts(&data, "rx_tls_resync_sent"); 880 880 881 881 return data; 882 882 } ··· 950 950 swap_off = repr * NN_ET_SWITCH_STATS_LEN; 951 951 952 952 for (i = 0; i < NN_ET_SWITCH_STATS_LEN; i++) 953 - ethtool_sprintf(&data, nfp_net_et_stats[i + swap_off].name); 953 + ethtool_puts(&data, nfp_net_et_stats[i + swap_off].name); 954 954 955 955 for (i = NN_ET_SWITCH_STATS_LEN; i < NN_ET_SWITCH_STATS_LEN * 2; i++) 956 - ethtool_sprintf(&data, nfp_net_et_stats[i - swap_off].name); 956 + ethtool_puts(&data, nfp_net_et_stats[i - swap_off].name); 957 957 958 958 for (i = NN_ET_SWITCH_STATS_LEN * 2; i < NN_ET_GLOBAL_STATS_LEN; i++) 959 - ethtool_sprintf(&data, nfp_net_et_stats[i].name); 959 + ethtool_puts(&data, nfp_net_et_stats[i].name); 960 960 961 961 for (i = 0; i < num_vecs; i++) { 962 962 ethtool_sprintf(&data, "rxq_%u_pkts", i);
+2 -2
drivers/net/ethernet/pensando/ionic/ionic_stats.c
··· 258 258 int i, q_num; 259 259 260 260 for (i = 0; i < IONIC_NUM_LIF_STATS; i++) 261 - ethtool_sprintf(buf, ionic_lif_stats_desc[i].name); 261 + ethtool_puts(buf, ionic_lif_stats_desc[i].name); 262 262 263 263 for (i = 0; i < IONIC_NUM_PORT_STATS; i++) 264 - ethtool_sprintf(buf, ionic_port_stats_desc[i].name); 264 + ethtool_puts(buf, ionic_port_stats_desc[i].name); 265 265 266 266 for (q_num = 0; q_num < MAX_Q(lif); q_num++) 267 267 ionic_sw_stats_get_tx_strings(lif, buf, q_num);
+1 -1
drivers/net/ethernet/wangxun/libwx/wx_ethtool.c
··· 75 75 switch (stringset) { 76 76 case ETH_SS_STATS: 77 77 for (i = 0; i < WX_GLOBAL_STATS_LEN; i++) 78 - ethtool_sprintf(&p, wx_gstrings_stats[i].stat_string); 78 + ethtool_puts(&p, wx_gstrings_stats[i].stat_string); 79 79 for (i = 0; i < netdev->num_tx_queues; i++) { 80 80 ethtool_sprintf(&p, "tx_queue_%u_packets", i); 81 81 ethtool_sprintf(&p, "tx_queue_%u_bytes", i);
+2 -2
drivers/net/hyperv/netvsc_drv.c
··· 1582 1582 switch (stringset) { 1583 1583 case ETH_SS_STATS: 1584 1584 for (i = 0; i < ARRAY_SIZE(netvsc_stats); i++) 1585 - ethtool_sprintf(&p, netvsc_stats[i].name); 1585 + ethtool_puts(&p, netvsc_stats[i].name); 1586 1586 1587 1587 for (i = 0; i < ARRAY_SIZE(vf_stats); i++) 1588 - ethtool_sprintf(&p, vf_stats[i].name); 1588 + ethtool_puts(&p, vf_stats[i].name); 1589 1589 1590 1590 for (i = 0; i < nvdev->num_chn; i++) { 1591 1591 ethtool_sprintf(&p, "tx_queue_%u_packets", i);
+1 -1
drivers/net/phy/nxp-tja11xx.c
··· 415 415 int i; 416 416 417 417 for (i = 0; i < ARRAY_SIZE(tja11xx_hw_stats); i++) 418 - ethtool_sprintf(&data, "%s", tja11xx_hw_stats[i].string); 418 + ethtool_puts(&data, tja11xx_hw_stats[i].string); 419 419 } 420 420 421 421 static void tja11xx_get_stats(struct phy_device *phydev,
+1 -1
drivers/net/phy/smsc.c
··· 508 508 int i; 509 509 510 510 for (i = 0; i < ARRAY_SIZE(smsc_hw_stats); i++) 511 - ethtool_sprintf(&data, "%s", smsc_hw_stats[i].string); 511 + ethtool_puts(&data, smsc_hw_stats[i].string); 512 512 } 513 513 514 514 static u64 smsc_get_stat(struct phy_device *phydev, int i)
+5 -5
drivers/net/vmxnet3/vmxnet3_ethtool.c
··· 245 245 246 246 for (j = 0; j < adapter->num_tx_queues; j++) { 247 247 for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_dev_stats); i++) 248 - ethtool_sprintf(&buf, vmxnet3_tq_dev_stats[i].desc); 248 + ethtool_puts(&buf, vmxnet3_tq_dev_stats[i].desc); 249 249 for (i = 0; i < ARRAY_SIZE(vmxnet3_tq_driver_stats); i++) 250 - ethtool_sprintf(&buf, vmxnet3_tq_driver_stats[i].desc); 250 + ethtool_puts(&buf, vmxnet3_tq_driver_stats[i].desc); 251 251 } 252 252 253 253 for (j = 0; j < adapter->num_rx_queues; j++) { 254 254 for (i = 0; i < ARRAY_SIZE(vmxnet3_rq_dev_stats); i++) 255 - ethtool_sprintf(&buf, vmxnet3_rq_dev_stats[i].desc); 255 + ethtool_puts(&buf, vmxnet3_rq_dev_stats[i].desc); 256 256 for (i = 0; i < ARRAY_SIZE(vmxnet3_rq_driver_stats); i++) 257 - ethtool_sprintf(&buf, vmxnet3_rq_driver_stats[i].desc); 257 + ethtool_puts(&buf, vmxnet3_rq_driver_stats[i].desc); 258 258 } 259 259 260 260 for (i = 0; i < ARRAY_SIZE(vmxnet3_global_stats); i++) 261 - ethtool_sprintf(&buf, vmxnet3_global_stats[i].desc); 261 + ethtool_puts(&buf, vmxnet3_global_stats[i].desc); 262 262 } 263 263 264 264 netdev_features_t vmxnet3_fix_features(struct net_device *netdev,