[RFC PATCH 2/5] ata: libahci_platform: Adapt the return value changed for disabled blob

Damien Le Moal dlemoal at kernel.org
Mon Sep 21 20:23:54 PDT 2026


On 9/22/26 11:47, Inochi Amaoto wrote:
> Check EOPNOTSUPP for disabled helper function as the change in phy core.
> 
> Signed-off-by: Inochi Amaoto <inochiama at gmail.com>
> ---
>  drivers/ata/libahci_platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
> index 6e072d681341..3e8ddbeb49b3 100644
> --- a/drivers/ata/libahci_platform.c
> +++ b/drivers/ata/libahci_platform.c
> @@ -371,11 +371,11 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port,
>  
>  	rc = PTR_ERR(hpriv->phys[port]);
>  	switch (rc) {
> -	case -ENOSYS:
> +	case -EOPNOTSUPP:
>  		/* No PHY support. Check if PHY is required. */
>  		if (of_property_present(node, "phys")) {
>  			dev_err(dev,
> -				"couldn't get PHY in node %pOFn: ENOSYS\n",
> +				"couldn't get PHY in node %pOFn: EOPNOTSUPP\n",

I do not see the point in printing an error code name. Instead, let's make the
error message more sensible. Something like:

	dev_err(dev, "Node %pOFn: PHY not supported\n", node);

Or

	dev_err(dev, "PHY not supported on node %pOFn\n", node);

>  				node);
>  			break;
>  		}


-- 
Damien Le Moal
Western Digital Research



More information about the linux-phy mailing list