[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+V-a8vQnno3vc8Hgav4m28hwgyf0cosMa_R4ALYkQcTtm6DNw@mail.gmail.com>
Date: Wed, 12 Nov 2025 13:53:43 +0000
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>, Geert Uytterhoeven <geert+renesas@...der.be>,
Vladimir Oltean <vladimir.oltean@....com>, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH net-next v3 2/3] net: phy: mscc: Consolidate probe
functions into a common helper
Hi Geert,
Thank you for the review.
On Wed, Nov 12, 2025 at 8:53 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Tue, 11 Nov 2025 at 10:11, Prabhakar <prabhakar.csengg@...il.com> wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > Unify the probe implementations of the VSC85xx PHY family into a single
> > vsc85xx_probe_common() helper. The existing probe functions for the
> > vsc85xx, vsc8514, vsc8574, and vsc8584 variants contained almost
> > identical initialization logic, differing only in configuration
> > parameters such as the number of LEDs, supported LED modes, hardware
> > statistics, and PTP support.
> >
> > Introduce a vsc85xx_probe_config structure to describe the per-variant
> > parameters, and move all common setup code into the shared helper. Each
> > variant's probe function now defines a constant configuration instance
> > and calls vsc85xx_probe_common().
> >
> > Also mark the default LED mode array parameter as const to match its
> > usage.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> > ---
> > v2->v3:
> > - Grouped check_rate_magic check
>
> Thanks for your patch!
>
> > --- a/drivers/net/phy/mscc/mscc_main.c
> > +++ b/drivers/net/phy/mscc/mscc_main.c
> > @@ -22,6 +22,24 @@
> > #include "mscc_serdes.h"
> > #include "mscc.h"
> >
> > +struct vsc85xx_probe_config {
> > + const struct vsc85xx_hw_stat *hw_stats;
> > + u8 nleds;
> > + u16 supp_led_modes;
> > + size_t nstats;
> > + bool use_package;
> > + size_t shared_size;
> > + bool has_ptp;
> > + bool check_rate_magic;
> > +};
>
> Please sort by decreasing size, to reduce holes:
> 1. pointer and size_t,
> 2. u16,
> 3. u8 and bool.
>
Ok, I'll sort it in v4.
Cheers,
Prabhakar
Powered by blists - more mailing lists