lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWgJJngTnhB8dFrEH-19br=YmQJgZNnv7S9HffMqDZfWw@mail.gmail.com>
Date: Tue, 22 Oct 2024 09:30:37 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Rosen Penev <rosenp@...il.com>
Cc: netdev@...r.kernel.org, Florian Fainelli <florian.fainelli@...adcom.com>, 
	Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Kurt Kanzenbach <kurt@...utronix.de>, Woojung Huh <woojung.huh@...rochip.com>, 
	"maintainer:MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER" <UNGLinuxDriver@...rochip.com>, 
	Clément Léger <clement.leger@...tlin.com>, 
	George McCollister <george.mccollister@...il.com>, Simon Horman <horms@...nel.org>, 
	open list <linux-kernel@...r.kernel.org>, 
	"open list:RENESAS RZ/N1 A5PSW SWITCH DRIVER" <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: use ethtool string helpers

Hi Rosen,

On Tue, Oct 22, 2024 at 1:55 AM Rosen Penev <rosenp@...il.com> wrote:
> These are the preferred way to copy ethtool strings.
>
> Avoids incrementing pointers all over the place.
>
> Signed-off-by: Rosen Penev <rosenp@...il.com>

Thanks for your patch!

Only looking at the Renesas RZ/N1 driver...

> --- a/drivers/net/dsa/rzn1_a5psw.c
> +++ b/drivers/net/dsa/rzn1_a5psw.c
> @@ -803,8 +803,7 @@ static void a5psw_get_strings(struct dsa_switch *ds, int port, u32 stringset,
>                 return;
>
>         for (u = 0; u < ARRAY_SIZE(a5psw_stats); u++) {
> -               memcpy(data + u * ETH_GSTRING_LEN, a5psw_stats[u].name,
> -                      ETH_GSTRING_LEN);
> +               ethtool_puts(&data, a5psw_stats[u].name);
>         }

Please remove the curly braces, as they are no longer needed.

>  }

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ