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

Maxime Chevallier maxime.chevallier at bootlin.com
Fri Feb 23 20:56:26 AEDT 2024


Hello Serge,

On Thu, 22 Feb 2024 20:58:23 +0300
Serge Semin <fancer.lancer at gmail.com> 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 at gmail.com>

This looks good to me,

Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>


More information about the openbmc mailing list