[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKxU2N9JGwfg37Qoj=gLj0_f+cd1dN_ek+GT402xOe-Y2M0xtg@mail.gmail.com>
Date: Mon, 21 Oct 2024 11:56:47 -0700
From: Rosen Penev <rosenp@...il.com>
To: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>, 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>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: mv88e6xxx: use ethtool_puts
On Mon, Oct 21, 2024 at 9:27 AM Kalesh Anakkur Purayil
<kalesh-anakkur.purayil@...adcom.com> wrote:
>
> On Mon, Oct 21, 2024 at 6:37 AM Rosen Penev <rosenp@...il.com> wrote:
> >
> > Allows simplifying get_strings and avoids manual pointer manipulation.
Looking more at these files, I see further pointer manipulation later
on. Specifically I have this change locally:
static void mv88e6xxx_get_strings(struct dsa_switch *ds, int port,
u32 stringset, uint8_t *data)
{
struct mv88e6xxx_chip *chip = ds->priv;
- int count = 0;
if (stringset != ETH_SS_STATS)
return;
mv88e6xxx_reg_lock(chip);
- if (chip->info->ops->stats_get_strings)
- count = chip->info->ops->stats_get_strings(chip, data);
-
- if (chip->info->ops->serdes_get_strings) {
- data += count * ETH_GSTRING_LEN;
- count = chip->info->ops->serdes_get_strings(chip, port, data);
- }
-
- data += count * ETH_GSTRING_LEN;
mv88e6xxx_atu_vtu_get_strings(data);
mv88e6xxx_reg_unlock(chip);
Do you guys think a v2 is in order?
> >
> > Signed-off-by: Rosen Penev <rosenp@...il.com>
>
> LGTM
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
>
>
> --
> Regards,
> Kalesh A P
Powered by blists - more mailing lists