dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/stm: dsi: Avoid printing errors for -EPROBE_DEFER
@ 2020-09-18 11:46 Yannick Fertre
  2020-09-24 20:42 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Yannick Fertre @ 2020-09-18 11:46 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Antonio Borneo, Vincent Abriou,
	David Airlie, Daniel Vetter, Maxime Coquelin, Alexandre Torgue,
	dri-devel, linux-stm32, linux-arm-kernel, linux-kernel

Don't print error when probe deferred error is returned.

Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
---
 drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
index 2e1f2664495d..164f79ef6269 100644
--- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
+++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
@@ -419,7 +419,8 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev)
 	dsi->dsi = dw_mipi_dsi_probe(pdev, &dw_mipi_dsi_stm_plat_data);
 	if (IS_ERR(dsi->dsi)) {
 		ret = PTR_ERR(dsi->dsi);
-		DRM_ERROR("Failed to initialize mipi dsi host: %d\n", ret);
+		if (ret != -EPROBE_DEFER)
+			DRM_ERROR("Failed to initialize mipi dsi host: %d\n", ret);
 		goto err_dsi_probe;
 	}
 
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/stm: dsi: Avoid printing errors for -EPROBE_DEFER
  2020-09-18 11:46 [PATCH] drm/stm: dsi: Avoid printing errors for -EPROBE_DEFER Yannick Fertre
@ 2020-09-24 20:42 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2020-09-24 20:42 UTC (permalink / raw)
  To: Yannick Fertre
  Cc: Maxime Coquelin, Antonio Borneo, Philippe Cornu, dri-devel,
	linux-kernel, David Airlie, Vincent Abriou, linux-stm32,
	linux-arm-kernel, Alexandre Torgue

Hi Yannick

On Fri, Sep 18, 2020 at 01:46:24PM +0200, Yannick Fertre wrote:
> Don't print error when probe deferred error is returned.
> 
> Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
> ---
>  drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> index 2e1f2664495d..164f79ef6269 100644
> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> @@ -419,7 +419,8 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev)
>  	dsi->dsi = dw_mipi_dsi_probe(pdev, &dw_mipi_dsi_stm_plat_data);
>  	if (IS_ERR(dsi->dsi)) {
>  		ret = PTR_ERR(dsi->dsi);
> -		DRM_ERROR("Failed to initialize mipi dsi host: %d\n", ret);
> +		if (ret != -EPROBE_DEFER)
> +			DRM_ERROR("Failed to initialize mipi dsi host: %d\n", ret);
>  		goto err_dsi_probe;

Please use dev_err_probe() here.
We will loose [drm] but gain more than we loose.

	Sam

>  	}
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-09-24 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 11:46 [PATCH] drm/stm: dsi: Avoid printing errors for -EPROBE_DEFER Yannick Fertre
2020-09-24 20:42 ` Sam Ravnborg

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).