From: Gerhard Engleder <gerhard@engleder-embedded.com>
To: Rosen Penev <rosenp@gmail.com>, netdev@vger.kernel.org
Cc: Marcin Wojtas <marcin.s.wojtas@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: mvneta: use ethtool_puts
Date: Fri, 11 Oct 2024 22:22:47 +0200 [thread overview]
Message-ID: <4f41c73a-019f-498d-a2d2-413848511882@engleder-embedded.com> (raw)
In-Reply-To: <20241011195955.7065-1-rosenp@gmail.com>
On 11.10.24 21:59, Rosen Penev wrote:
> Allows simplifying get_strings and avoids manual pointer manipulation.
>
> Tested on Turris Omnia.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index fcd89c67094f..7bb781fb93b5 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -4795,11 +4795,9 @@ static void mvneta_ethtool_get_strings(struct net_device *netdev, u32 sset,
> int i;
>
> for (i = 0; i < ARRAY_SIZE(mvneta_statistics); i++)
> - memcpy(data + i * ETH_GSTRING_LEN,
> - mvneta_statistics[i].name, ETH_GSTRING_LEN);
> + ethtool_puts(&data, mvneta_statistics[i].name);
>
> if (!pp->bm_priv) {
> - data += ETH_GSTRING_LEN * ARRAY_SIZE(mvneta_statistics);
Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>
next prev parent reply other threads:[~2024-10-11 20:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 19:59 Rosen Penev
2024-10-11 20:22 ` Gerhard Engleder [this message]
2024-10-15 1:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f41c73a-019f-498d-a2d2-413848511882@engleder-embedded.com \
--to=gerhard@engleder-embedded.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.s.wojtas@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rosenp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®