Re: [PATCH net-next v5 2/6] net: dsa: motorcomm: use max_ports from series_info for port bounds checking
From: Andrew Lunn
Date: Fri Sep 04 2026 - 09:51:38 EST
On Fri, Sep 04, 2026 at 05:54:12PM +0800, Kyle Switch wrote:
> Replace the hardcoded YT921X_PORT_NUM macro with the per-series
> max_ports field in port validation. This removes family-specific
> constants from the common code path and simplifies adding new
> switch families with different port counts.
>
> No functional change for existing YT921X devices.
>
> Signed-off-by: Kyle Switch <kyle.switch@xxxxxxxxxxxxxx>
Did you review your own patch? Don't you think it is now a lot easier
to see this patch is correct, now that it is short, does one thing and
have a commit message focused on just this change.
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew