Skip to contentSkip to conversation

drm: rcar-du: EPROBE_DEFER case doesn't need error message

PATCH Superseded Kuninori Morimoto 2 participants 8 messages May 24, 2016 – Jun 10, 2016 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#2 lore raw

PATCH 1/1 drm: rcar-du: EPROBE_DEFER case doesn't need error message

In reply to a message not in the archive

From: Kuninori Morimoto <[email protected]>

EPROBE_DEFER is not error, thus, error message on kernel log on this case is confusable for user. Prints it only error cases.

---
 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_drv.c +4 -2
index 26fd3ba..1db080c 100644
@@ -354,14 +354,16 @@ static int rcar_du_probe(struct platform_device *pdev)
 	 */
 	ret = drm_vblank_init(ddev, (1 << rcdu->info->num_crtcs) - 1);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to initialize vblank\n");
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "failed to initialize vblank\n");
 		goto error;
 	}
 
 	/* DRM/KMS objects */
 	ret = rcar_du_modeset_init(rcdu);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to initialize DRM/KMS (%d)\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "failed to initialize DRM/KMS (%d)\n", ret);
 		goto error;
 	}
 
Signature · 1 line
1.9.1
#3 lore raw

Hi Morimoto-san,

Thank you for the patch.

Quoted 15 lines · On Tuesday 24 May 2016 14:24:09 Kuninori Morimoto wrote:

From: Kuninori Morimoto <[email protected]>

EPROBE_DEFER is not error, thus, error message on kernel log on this case is confusable for user. Prints it only error cases.

---
 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 26fd3ba..1db080c 100644

drivers/gpu/drm/rcar-du/rcar_du_drv.c static int rcar_du_probe(struct platform_device *pdev) · line 357

Quoted 5 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +1 -1
@@ -354,14 +354,16 @@ static int rcar_du_probe(struct platform_device *pdev)
 */
 	ret = drm_vblank_init(ddev, (1 << rcdu->info->num_crtcs) - 1);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to initialize vblank\n");
+		if (ret != -EPROBE_DEFER)

I don't think this can ever happen. Actually, the only reason drm_vblank_init() could return an error at the moment is a kcalloc() failure, so we could remove this message completely.

Quoted 12 lines
drivers/gpu/drm/rcar-du/rcar_du_drv.c +3 -1
+			dev_err(&pdev->dev, "failed to initialize vblank\n");
 		goto error;
 	}
 
 	/* DRM/KMS objects */
 	ret = rcar_du_modeset_init(rcdu);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to initialize DRM/KMS (%d)\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "failed to initialize DRM/KMS (%d)\n", ret);
 		goto error;
 	}
Signature · 3 lines
Regards,

Laurent Pinchart
#4 lore raw

Hi Laurent

Quoted 10 lines
Quoted 10 lines

From: Kuninori Morimoto <[email protected]>

EPROBE_DEFER is not error, thus, error message on kernel log on this case is confusable for user. Prints it only error cases.

---
 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 14 lines

drivers/gpu/drm/rcar-du/rcar_du_drv.c static int rcar_du_probe(struct platform_device *pdev) · line 357

Quoted 10 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 26fd3ba..1db080c 100644

drivers/gpu/drm/rcar-du/rcar_du_drv.c +1 -1
@@ -354,14 +354,16 @@ static int rcar_du_probe(struct platform_device *pdev)
 */
 	ret = drm_vblank_init(ddev, (1 << rcdu->info->num_crtcs) - 1);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to initialize vblank\n");
+		if (ret != -EPROBE_DEFER)

I don't think this can ever happen. Actually, the only reason drm_vblank_init() could return an error at the moment is a kcalloc() failure, so we could remove this message completely.

OK, will send v2 patch

Best regards
---
Kuninori Morimoto

#5 lore raw

v2 cover drm: rcar-du: EPROBE_DEFER case doesn't need error message

In reply to a message not in the archive

Hi David, Laurent

These removes unneeded error message from Renesas DU driver. Current this unneeded error message makes user confuse.

Kuninori Morimoto (2):
drm: rcar-du: error message is not needed for drm_vblank_init()
drm: rcar-du: error message is not needed for EPROBE_DEFER

 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
#6 lore raw

PATCH v2 1/2 drm: rcar-du: error message is not needed for drm_vblank_init()

From: Kuninori Morimoto <[email protected]>

The only reason drm_vblank_init() could return an error at the moment is a kcalloc() failure.
So we can remove current error message completely.

---
v1 -> v2

- just removed error message

 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/rcar-du/rcar_du_drv.c +1 -3
index 26fd3ba..786f5d6 100644
@@ -353,10 +353,8 @@ static int rcar_du_probe(struct platform_device *pdev)
 	 * disabled for all CRTCs.
 	 */
 	ret = drm_vblank_init(ddev, (1 << rcdu->info->num_crtcs) - 1);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to initialize vblank\n");
+	if (ret < 0)
 		goto error;
-	}
 
 	/* DRM/KMS objects */
 	ret = rcar_du_modeset_init(rcdu);
Signature · 1 line
1.9.1
#7 lore raw

PATCH v2 2/2 drm: rcar-du: error message is not needed for EPROBE_DEFER

In reply to Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

EPROBE_DEFER is not error, thus, error message on kernel log on this case is confusable. Print it only error cases

---
v1 -> v2

- only for rcar_du_modeset_init()

 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/rcar-du/rcar_du_drv.c +2 -1
index 786f5d6..cf2698e 100644
@@ -359,7 +359,8 @@ static int rcar_du_probe(struct platform_device *pdev)
 	/* DRM/KMS objects */
 	ret = rcar_du_modeset_init(rcdu);
 	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to initialize DRM/KMS (%d)\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "failed to initialize DRM/KMS (%d)\n", ret);
 		goto error;
 	}
 
Signature · 1 line
1.9.1
#8 lore raw
In reply to Kuninori Morimoto

Hi David

ping ?

Quoted 10 lines

These removes unneeded error message from Renesas DU driver. Current this unneeded error message makes user confuse.

Kuninori Morimoto (2):
drm: rcar-du: error message is not needed for drm_vblank_init()
drm: rcar-du: error message is not needed for EPROBE_DEFER

 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Reviewed-by on the v2 series
#9 lore raw
In reply to Kuninori Morimoto

Hi Morimoto-san,

Quoted 4 lines · On Wednesday 25 May 2016 00:38:48 Kuninori Morimoto wrote:

Hi David, Laurent

These removes unneeded error message from Renesas DU driver. Current this unneeded error message makes user confuse.

Thank you for the patches. For both of them,

I've applied them to my tree and include them in my next pull request.

Quoted 6 lines

Kuninori Morimoto (2):
drm: rcar-du: error message is not needed for drm_vblank_init()
drm: rcar-du: error message is not needed for EPROBE_DEFER

 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel