Skip to content

Commit 73840ca

Browse files
neheblunn
authored andcommitted
net: mv643xx: use ethtool_puts
Allows simplifying get_strings and avoids manual pointer manipulation. Signed-off-by: Rosen Penev <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Message-ID: <[email protected]> Signed-off-by: Andrew Lunn <[email protected]>
1 parent 853a294 commit 73840ca

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/net/ethernet/marvell/mv643xx_eth.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,13 +1698,9 @@ static void mv643xx_eth_get_strings(struct net_device *dev,
16981698
{
16991699
int i;
17001700

1701-
if (stringset == ETH_SS_STATS) {
1702-
for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++) {
1703-
memcpy(data + i * ETH_GSTRING_LEN,
1704-
mv643xx_eth_stats[i].stat_string,
1705-
ETH_GSTRING_LEN);
1706-
}
1707-
}
1701+
if (stringset == ETH_SS_STATS)
1702+
for (i = 0; i < ARRAY_SIZE(mv643xx_eth_stats); i++)
1703+
ethtool_puts(&data, mv643xx_eth_stats[i].stat_string);
17081704
}
17091705

17101706
static void mv643xx_eth_get_ethtool_stats(struct net_device *dev,

0 commit comments

Comments
 (0)