mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
net: ag71xx: use ethtool_puts
Allows simplifying get_strings and avoids manual pointer manipulation. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20240905194938.8453-5-rosenp@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
2854085057
commit
441a279862
|
|
@ -509,8 +509,7 @@ static void ag71xx_ethtool_get_strings(struct net_device *netdev, u32 sset,
|
|||
switch (sset) {
|
||||
case ETH_SS_STATS:
|
||||
for (i = 0; i < ARRAY_SIZE(ag71xx_statistics); i++)
|
||||
memcpy(data + i * ETH_GSTRING_LEN,
|
||||
ag71xx_statistics[i].name, ETH_GSTRING_LEN);
|
||||
ethtool_puts(&data, ag71xx_statistics[i].name);
|
||||
break;
|
||||
case ETH_SS_TEST:
|
||||
net_selftest_get_strings(data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user