Re: [PATCH net-next v2 4/4] net: pcs: xpcs: Explicitly return error on caps validation

From: Maxime Chevallier
Date: Fri Feb 23 2024 - 04:56:40 EST


Hello Serge,

On Thu, 22 Feb 2024 20:58:23 +0300
Serge Semin <fancer.lancer@xxxxxxxxx> wrote:

> If an unsupported interface is passed to the PCS validation callback there
> is no need in further link-modes calculations since the resultant array
> will be initialized with zeros which will be perceived by the phylink
> subsystem as error anyway (see phylink_validate_mac_and_pcs()). Instead
> let's explicitly return the -EINVAL error to inform the caller about the
> unsupported interface as it's done in the rest of the pcs_validate
> callbacks.
>
> Signed-off-by: Serge Semin <fancer.lancer@xxxxxxxxx>

This looks good to me,

Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>