diff options
| author | [email protected] <[email protected]> | 2023-12-06 23:16:12 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-12-08 10:56:25 +0000 |
| commit | e403cffff1a46ab1a95d3bc72e92634445d68328 (patch) | |
| tree | acd9d83659679831df06d1c12f0ee8c469587b06 /drivers/net/ethernet/freescale/fec_main.c | |
| parent | checkpatch: add ethtool_sprintf rules (diff) | |
| download | kernel-e403cffff1a46ab1a95d3bc72e92634445d68328.tar.gz kernel-e403cffff1a46ab1a95d3bc72e92634445d68328.zip | |
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 <[email protected]>
Reviewed-by: Wei Fang <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Louis Peens <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
| -rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index c3b7694a7485..bae9536de767 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -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); |
