summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mscc/mscc_main.c
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2024-10-29 16:46:41 -0700
committerJakub Kicinski <kuba@kernel.org>2024-11-03 11:07:46 -0800
commit1441df3a37eced275a9c096f766dcab6faee54ee (patch)
tree492ce0ba5303ccedc0b6f5fec0dd86380bd99941 /drivers/net/phy/mscc/mscc_main.c
parent69cb0b97ed272778986e494fed7b2f56e0f80a4c (diff)
net: phy: use ethtool string helpers
These are the preferred way to copy ethtool strings. Avoids incrementing pointers all over the place. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20241029234641.11448-1-rosenp@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/mscc/mscc_main.c')
-rw-r--r--drivers/net/phy/mscc/mscc_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/phy/mscc/mscc_main.c b/drivers/net/phy/mscc/mscc_main.c
index 6f74ce0ab1aa..bee381200ab8 100644
--- a/drivers/net/phy/mscc/mscc_main.c
+++ b/drivers/net/phy/mscc/mscc_main.c
@@ -139,8 +139,7 @@ static void vsc85xx_get_strings(struct phy_device *phydev, u8 *data)
return;
for (i = 0; i < priv->nstats; i++)
- strscpy(data + i * ETH_GSTRING_LEN, priv->hw_stats[i].string,
- ETH_GSTRING_LEN);
+ ethtool_puts(&data, priv->hw_stats[i].string);
}
static u64 vsc85xx_get_stat(struct phy_device *phydev, int i)