* [PATCH net-next] net: mv643xx: use ethtool_puts
@ 2024-10-18 20:05 Rosen Penev
2024-10-21 15:56 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rosen Penev @ 2024-10-18 20:05 UTC (permalink / raw)
To: netdev
Cc: Sebastian Hesselbarth, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, open list
Allows simplifying get_strings and avoids manual pointer manipulation.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/ethernet/marvell/mv643xx_eth.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 4abd3ebcdbd6..a06048719e84 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -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,
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: mv643xx: use ethtool_puts
2024-10-18 20:05 [PATCH net-next] net: mv643xx: use ethtool_puts Rosen Penev
@ 2024-10-21 15:56 ` Andrew Lunn
2024-10-21 16:27 ` Kalesh Anakkur Purayil
2024-10-22 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2024-10-21 15:56 UTC (permalink / raw)
To: Rosen Penev
Cc: netdev, Sebastian Hesselbarth, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, open list
On Fri, Oct 18, 2024 at 01:05:22PM -0700, Rosen Penev wrote:
> Allows simplifying get_strings and avoids manual pointer manipulation.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: mv643xx: use ethtool_puts
2024-10-18 20:05 [PATCH net-next] net: mv643xx: use ethtool_puts Rosen Penev
2024-10-21 15:56 ` Andrew Lunn
@ 2024-10-21 16:27 ` Kalesh Anakkur Purayil
2024-10-22 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Kalesh Anakkur Purayil @ 2024-10-21 16:27 UTC (permalink / raw)
To: Rosen Penev
Cc: netdev, Sebastian Hesselbarth, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, open list
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On Sat, Oct 19, 2024 at 1:35 AM Rosen Penev <rosenp@gmail.com> wrote:
>
> Allows simplifying get_strings and avoids manual pointer manipulation.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
LGTM
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
--
Regards,
Kalesh A P
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4239 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: mv643xx: use ethtool_puts
2024-10-18 20:05 [PATCH net-next] net: mv643xx: use ethtool_puts Rosen Penev
2024-10-21 15:56 ` Andrew Lunn
2024-10-21 16:27 ` Kalesh Anakkur Purayil
@ 2024-10-22 23:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-22 23:10 UTC (permalink / raw)
To: Rosen Penev
Cc: netdev, sebastian.hesselbarth, andrew+netdev, davem, edumazet,
kuba, pabeni, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Andrew Lunn <andrew@lunn.ch>:
On Fri, 18 Oct 2024 13:05:22 -0700 you wrote:
> Allows simplifying get_strings and avoids manual pointer manipulation.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-22 23:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 20:05 [PATCH net-next] net: mv643xx: use ethtool_puts Rosen Penev
2024-10-21 15:56 ` Andrew Lunn
2024-10-21 16:27 ` Kalesh Anakkur Purayil
2024-10-22 23:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).