Skip to content

Commit 9de722c

Browse files
nehebkuba-moo
authored andcommitted
net: mvneta: use ethtool_puts
Allows simplifying get_strings and avoids manual pointer manipulation. Tested on Turris Omnia. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com> Link: https://patch.msgid.link/20241011195955.7065-1-rosenp@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 5bedbfc commit 9de722c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/marvell/mvneta.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4795,11 +4795,9 @@ static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
47954795
int i;
47964796

47974797
for (i = 0; i < ARRAY_SIZE(mvneta_statistics); i++)
4798-
memcpy(data + i * ETH_GSTRING_LEN,
4799-
mvneta_statistics[i].name, ETH_GSTRING_LEN);
4798+
ethtool_puts(&data, mvneta_statistics[i].name);
48004799

48014800
if (!pp->bm_priv) {
4802-
data += ETH_GSTRING_LEN * ARRAY_SIZE(mvneta_statistics);
48034801
page_pool_ethtool_stats_get_strings(data);
48044802
}
48054803
}

0 commit comments

Comments
 (0)