net: mv643xx: use ethtool_puts
Subsystems (3)
PATCH 1/1 net: mv643xx: use ethtool_puts
Allows simplifying get_strings and avoids manual pointer manipulation.
Signed-off-by Rosen Penev <[email protected]>
--- drivers/net/ethernet/marvell/mv643xx_eth.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/ethernet/marvell/mv643xx_eth.c +3 -7
@@ -1698,13 +1698,9 @@ static void mv643xx_eth_get_strings(struct net_device *dev, {int i; -if (stringset ==ETH_SS_STATS ) { -for (i =0 ; i <ARRAY_SIZE (mv643xx_eth_stats); i++) { -memcpy (data + i *ETH_GSTRING_LEN , - mv643xx_eth_stats[i].stat_string, -ETH_GSTRING_LEN ); - } - } +if (stringset ==ETH_SS_STATS ) +for (i =0 ; i <ARRAY_SIZE (mv643xx_eth_stats); i++) +ethtool_puts (&data, mv643xx_eth_stats[i].stat_string); } static void mv643xx_eth_get_ethtool_stats(struct net_device *dev,
Signature · 1 line
2.47.0
Quoted 3 lines · Rosen Penev
Allows simplifying
get_stringsand avoids manual pointer manipulation.Signed-off-by Rosen Penev <[email protected]>
Reviewed-by Andrew Lunn <[email protected]>
Andrew
Quoted 4 lines · Rosen Penev
Allows simplifying
get_stringsand avoids manual pointer manipulation.Signed-off-by Rosen Penev <[email protected]>
LGTM
Reviewed-by Kalesh AP <[email protected]>
Signature · 2 lines
Regards, Kalesh A P
This patch was applied to netdev/net-next.git (main) by Andrew Lunn <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Andrew Lunn <[email protected]>:
Quoted 6 lines · On Fri, 18 Oct 2024 13:05:22 -0700 you wrote:
Allows simplifying
get_stringsand avoids manual pointer manipulation.Signed-off-by Rosen Penev <[email protected]>--- drivers/net/ethernet/marvell/mv643xx_eth.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
Here is the summary with links:
- [net-next] net: mv643xx: use ethtool_puts
https://git.kernel.org/netdev/net-next/c/73840ca5ef36
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html