All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Moon <linux.amoon@gmail.com>
To: Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-phy@lists.infradead.org (open list:GENERIC PHY FRAMEWORK),
	linux-arm-kernel@lists.infradead.org (moderated list:ARM/Amlogic
	Meson SoC support),
	linux-amlogic@lists.infradead.org (open list:ARM/Amlogic Meson
	SoC support), linux-kernel@vger.kernel.org (open list)
Cc: Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH v1 2/6] phy: amlogic: phy-meson-g12a-usb2: Simplify error handling with dev_err_probe()
Date: Thu, 10 Apr 2025 19:03:17 +0530	[thread overview]
Message-ID: <20250410133332.294556-3-linux.amoon@gmail.com> (raw)
In-Reply-To: <20250410133332.294556-1-linux.amoon@gmail.com>

Use dev_err_probe() for phy resources to indicate the deferral
reason when waiting for the resource to come up.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/phy/amlogic/phy-meson-g12a-usb2.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
index 0e0b5c00b676f..66bf0b7ef8ed3 100644
--- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
@@ -339,13 +339,9 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev)
 		return ret;
 
 	phy = devm_phy_create(dev, NULL, &phy_meson_g12a_usb2_ops);
-	if (IS_ERR(phy)) {
-		ret = PTR_ERR(phy);
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "failed to create PHY\n");
-
-		return ret;
-	}
+	if (IS_ERR(phy))
+		return dev_err_probe(dev, PTR_ERR(phy),
+				     "failed to create PHY\n");
 
 	phy_set_bus_width(phy, 8);
 	phy_set_drvdata(phy, priv);
-- 
2.49.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

WARNING: multiple messages have this Message-ID (diff)
From: Anand Moon <linux.amoon@gmail.com>
To: Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-phy@lists.infradead.org (open list:GENERIC PHY FRAMEWORK),
	linux-arm-kernel@lists.infradead.org (moderated list:ARM/Amlogic
	Meson SoC support),
	linux-amlogic@lists.infradead.org (open list:ARM/Amlogic Meson
	SoC support), linux-kernel@vger.kernel.org (open list)
Cc: Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH v1 2/6] phy: amlogic: phy-meson-g12a-usb2: Simplify error handling with dev_err_probe()
Date: Thu, 10 Apr 2025 19:03:17 +0530	[thread overview]
Message-ID: <20250410133332.294556-3-linux.amoon@gmail.com> (raw)
In-Reply-To: <20250410133332.294556-1-linux.amoon@gmail.com>

Use dev_err_probe() for phy resources to indicate the deferral
reason when waiting for the resource to come up.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/phy/amlogic/phy-meson-g12a-usb2.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
index 0e0b5c00b676f..66bf0b7ef8ed3 100644
--- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
@@ -339,13 +339,9 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev)
 		return ret;
 
 	phy = devm_phy_create(dev, NULL, &phy_meson_g12a_usb2_ops);
-	if (IS_ERR(phy)) {
-		ret = PTR_ERR(phy);
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "failed to create PHY\n");
-
-		return ret;
-	}
+	if (IS_ERR(phy))
+		return dev_err_probe(dev, PTR_ERR(phy),
+				     "failed to create PHY\n");
 
 	phy_set_bus_width(phy, 8);
 	phy_set_drvdata(phy, priv);
-- 
2.49.0



WARNING: multiple messages have this Message-ID (diff)
From: Anand Moon <linux.amoon@gmail.com>
To: Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	linux-phy@lists.infradead.org (open list:GENERIC PHY FRAMEWORK),
	linux-arm-kernel@lists.infradead.org (moderated list:ARM/Amlogic
	Meson SoC support),
	linux-amlogic@lists.infradead.org (open list:ARM/Amlogic Meson
	SoC support), linux-kernel@vger.kernel.org (open list)
Cc: Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH v1 2/6] phy: amlogic: phy-meson-g12a-usb2: Simplify error handling with dev_err_probe()
Date: Thu, 10 Apr 2025 19:03:17 +0530	[thread overview]
Message-ID: <20250410133332.294556-3-linux.amoon@gmail.com> (raw)
In-Reply-To: <20250410133332.294556-1-linux.amoon@gmail.com>

Use dev_err_probe() for phy resources to indicate the deferral
reason when waiting for the resource to come up.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/phy/amlogic/phy-meson-g12a-usb2.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
index 0e0b5c00b676f..66bf0b7ef8ed3 100644
--- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
@@ -339,13 +339,9 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev)
 		return ret;
 
 	phy = devm_phy_create(dev, NULL, &phy_meson_g12a_usb2_ops);
-	if (IS_ERR(phy)) {
-		ret = PTR_ERR(phy);
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "failed to create PHY\n");
-
-		return ret;
-	}
+	if (IS_ERR(phy))
+		return dev_err_probe(dev, PTR_ERR(phy),
+				     "failed to create PHY\n");
 
 	phy_set_bus_width(phy, 8);
 	phy_set_drvdata(phy, priv);
-- 
2.49.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2025-04-10 13:39 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 13:33 [PATCH v1 0/6] Messon: Simplify error handling with dev_err_probe() Anand Moon
2025-04-10 13:33 ` Anand Moon
2025-04-10 13:33 ` Anand Moon
2025-04-10 13:33 ` [PATCH v1 1/6] phy: amlogic: phy-meson-gxl-usb2: " Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-11  8:32   ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-10 13:33 ` Anand Moon [this message]
2025-04-10 13:33   ` [PATCH v1 2/6] phy: amlogic: phy-meson-g12a-usb2: " Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-11  8:32   ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 3/6] phy: amlogic: phy-meson-axg-mipi-pcie-analog: " Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-11  8:32   ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 4/6] phy: amlogic: phy-meson-axg-mipi-dphy: " Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-11  8:32   ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 5/6] phy: amlogic: phy-meson-axg-pcie: " Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-11  8:32   ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-11  8:32     ` Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 6/6] phy: amlogic: phy-meson-axg-pcie: Fix PHY creation order in axg-pcie probe Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-10 13:33   ` Anand Moon
2025-04-11  8:33   ` Neil Armstrong
2025-04-11  8:33     ` Neil Armstrong
2025-04-11  8:33     ` Neil Armstrong
2025-04-11 12:11 ` [PATCH v1 0/6] Messon: Simplify error handling with dev_err_probe() Vinod Koul
2025-04-11 12:11   ` Vinod Koul
2025-04-11 12:11   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250410133332.294556-3-linux.amoon@gmail.com \
    --to=linux.amoon@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=kishon@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.