diff options
author | Rosen Penev <rosenp@gmail.com> | 2024-10-29 16:46:41 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-03 11:07:46 -0800 |
commit | 1441df3a37eced275a9c096f766dcab6faee54ee (patch) | |
tree | 492ce0ba5303ccedc0b6f5fec0dd86380bd99941 /drivers/net/phy/qcom | |
parent | 69cb0b97ed272778986e494fed7b2f56e0f80a4c (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/qcom')
-rw-r--r-- | drivers/net/phy/qcom/qca83xx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/phy/qcom/qca83xx.c b/drivers/net/phy/qcom/qca83xx.c index a05d0df6fa16..7a5039920b9f 100644 --- a/drivers/net/phy/qcom/qca83xx.c +++ b/drivers/net/phy/qcom/qca83xx.c @@ -42,10 +42,8 @@ static void qca83xx_get_strings(struct phy_device *phydev, u8 *data) { int i; - for (i = 0; i < ARRAY_SIZE(qca83xx_hw_stats); i++) { - strscpy(data + i * ETH_GSTRING_LEN, - qca83xx_hw_stats[i].string, ETH_GSTRING_LEN); - } + for (i = 0; i < ARRAY_SIZE(qca83xx_hw_stats); i++) + ethtool_puts(&data, qca83xx_hw_stats[i].string); } static u64 qca83xx_get_stat(struct phy_device *phydev, int i) |