Re: [PATCH net-next] net: dsa: use ethtool string helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rosen,

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

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@xxxxxxxxxxxxxx

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





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux