Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: mv643xx: use ethtool_puts

Allows simplifying get_strings and avoids manual pointer manipulation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Message-ID: <20241018200522.12506-1-rosenp@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>

authored by

Rosen Penev and committed by
Andrew Lunn
73840ca5 853a2944

+3 -7
+3 -7
drivers/net/ethernet/marvell/mv643xx_eth.c
··· 1698 1698 { 1699 1699 int i; 1700 1700 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); 1708 1704 } 1709 1705 1710 1706 static void mv643xx_eth_get_ethtool_stats(struct net_device *dev,