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

From
Damien Le Moal <dlemoal@kernel.org>
Date
2026-09-22 03:24:04
Also in
dri-devel, linux-ide, linux-usb, lkml
Reply to
Inochi Amaoto, 2026-09-22
On 9/22/26 11:47, Inochi Amaoto wrote:
quoted hunk ↗ jump to hunk
Check EOPNOTSUPP for disabled helper function as the change in phy core.

Signed-off-by: Inochi Amaoto <inochiama@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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
Thread (14 messages) 14 messages, 3 authors, last reply 2026-09-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help