Re: [PATCH net-next 03/16] net: pcs: xpcs: Return EINVAL in the internal methods

From: Andrew Lunn
Date: Tue Dec 05 2023 - 08:34:53 EST


On Tue, Dec 05, 2023 at 01:35:24PM +0300, Serge Semin wrote:
> In particular the xpcs_soft_reset() and xpcs_do_config() functions
> currently return -1 if invalid auto-negotiation mode is specified. That
> value can be then passed to the generic kernel subsystems which require a
> standard kernel errno value. Even though the error conditions are very
> specific (memory corruption or buggy implementation) using a hard-coded -1
> literal doesn't seem correct anyway.
>
> Signed-off-by: Serge Semin <fancer.lancer@xxxxxxxxx>

Tested-by: Andrew Lunn <andrew@xxxxxxx>

Andrew