Re: [PATCH net-next v3 2/3] net: phy: mscc: Consolidate probe functions into a common helper

From: Andrew Lunn

Date: Tue Nov 11 2025 - 08:23:45 EST


On Tue, Nov 11, 2025 at 09:10:46AM +0000, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxx>

That additional flag to diff made it a lot easier to read. Thanks. I
will have to remember that for the future.

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew