linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/exynos: dsi: Simplify with dev_err_probe()
@ 2020-08-26 14:55 ` Krzysztof Kozlowski
  2020-08-26 14:55   ` [PATCH 2/2] drm/exynos: hdmi: " Krzysztof Kozlowski
  2020-08-26 15:56   ` [PATCH 1/2] drm/exynos: dsi: " Andrzej Hajda
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26 14:55 UTC (permalink / raw)
  To: Inki Dae, Joonyoung Shim, Seung-Woo Kim, Kyungmin Park,
	David Airlie, Daniel Vetter, Kukjin Kim, Krzysztof Kozlowski,
	dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 1a1a2853a842..5b9666fc7af1 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1760,11 +1760,8 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 	dsi->supplies[1].supply = "vddio";
 	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(dsi->supplies),
 				      dsi->supplies);
-	if (ret) {
-		if (ret != -EPROBE_DEFER)
-			dev_info(dev, "failed to get regulators: %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "failed to get regulators\n");
 
 	dsi->clks = devm_kcalloc(dev,
 			dsi->driver_data->num_clks, sizeof(*dsi->clks),
-- 
2.17.1


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm/exynos: hdmi: Simplify with dev_err_probe()
  2020-08-26 14:55 ` [PATCH 1/2] drm/exynos: dsi: Simplify with dev_err_probe() Krzysztof Kozlowski
@ 2020-08-26 14:55   ` Krzysztof Kozlowski
  2020-08-26 15:56     ` Andrzej Hajda
  2020-08-26 15:56   ` [PATCH 1/2] drm/exynos: dsi: " Andrzej Hajda
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-26 14:55 UTC (permalink / raw)
  To: Inki Dae, Joonyoung Shim, Seung-Woo Kim, Kyungmin Park,
	David Airlie, Daniel Vetter, Kukjin Kim, Krzysztof Kozlowski,
	dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index c5ba32fca5f3..dc01c188c0e0 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1797,11 +1797,8 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
 		hdata->regul_bulk[i].supply = supply[i];
 
 	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(supply), hdata->regul_bulk);
-	if (ret) {
-		if (ret != -EPROBE_DEFER)
-			DRM_DEV_ERROR(dev, "failed to get regulators\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "failed to get regulators\n");
 
 	hdata->reg_hdmi_en = devm_regulator_get_optional(dev, "hdmi-en");
 
-- 
2.17.1


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/exynos: dsi: Simplify with dev_err_probe()
  2020-08-26 14:55 ` [PATCH 1/2] drm/exynos: dsi: Simplify with dev_err_probe() Krzysztof Kozlowski
  2020-08-26 14:55   ` [PATCH 2/2] drm/exynos: hdmi: " Krzysztof Kozlowski
@ 2020-08-26 15:56   ` Andrzej Hajda
  1 sibling, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2020-08-26 15:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, David Airlie, Daniel Vetter, Kukjin Kim,
	dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel


On 26.08.2020 16:55, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and also it prints the error value.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

Regards
Andrzej

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/exynos: hdmi: Simplify with dev_err_probe()
  2020-08-26 14:55   ` [PATCH 2/2] drm/exynos: hdmi: " Krzysztof Kozlowski
@ 2020-08-26 15:56     ` Andrzej Hajda
  0 siblings, 0 replies; 4+ messages in thread
From: Andrzej Hajda @ 2020-08-26 15:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, David Airlie, Daniel Vetter, Kukjin Kim,
	dri-devel, linux-arm-kernel, linux-samsung-soc, linux-kernel


On 26.08.2020 16:55, Krzysztof Kozlowski wrote:
> Common pattern of handling deferred probe can be simplified with
> dev_err_probe().  Less code and also it prints the error value.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

Regards
Andrzej

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-26 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200826145528eucas1p10342e7d1c88a31adfcea420f8c80af81@eucas1p1.samsung.com>
2020-08-26 14:55 ` [PATCH 1/2] drm/exynos: dsi: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-08-26 14:55   ` [PATCH 2/2] drm/exynos: hdmi: " Krzysztof Kozlowski
2020-08-26 15:56     ` Andrzej Hajda
2020-08-26 15:56   ` [PATCH 1/2] drm/exynos: dsi: " Andrzej Hajda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).