Skip to contentSkip to conversation

drm/exynos: Remove dev_err() on platform_get_irq() failure

PATCH Superseded Tamseel Shams 2 participants 3 messages May 19, 2020 – May 21, 2020 1 message not in the archive

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20200519110323epcas5p23b9472d505f5ba58d033fa468cb9969d@epcas5p2.samsung.com

#1 lore raw

PATCH v2 1/1 drm/exynos: Remove dev_err() on platform_get_irq() failure

platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle.

Also removing unnecessary curly braces around if () statement.

---
Fixed review comment by [email protected]

 drivers/gpu/drm/exynos/exynos_drm_dsi.c     | 4 +---
 drivers/gpu/drm/exynos/exynos_drm_g2d.c     | 1 -
 drivers/gpu/drm/exynos/exynos_drm_rotator.c | 4 +---
 drivers/gpu/drm/exynos/exynos_drm_scaler.c  | 4 +---
 4 files changed, 3 insertions(+), 10 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +1 -3
index 902938d2568f..958e2c6a6702 100644
@@ -1809,10 +1809,8 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 	}
 
 	dsi->irq = platform_get_irq(pdev, 0);
-	if (dsi->irq < 0) {
-		dev_err(dev, "failed to request dsi irq resource\n");
+	if (dsi->irq < 0)
 		return dsi->irq;
-	}
 
 	irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
 	ret = devm_request_threaded_irq(dev, dsi->irq, NULL,
drivers/gpu/drm/exynos/exynos_drm_g2d.c +0 -1
index fcee33a43aca..03be31427181 100644
@@ -1498,7 +1498,6 @@ static int g2d_probe(struct platform_device *pdev)
 
 	g2d->irq = platform_get_irq(pdev, 0);
 	if (g2d->irq < 0) {
-		dev_err(dev, "failed to get irq\n");
 		ret = g2d->irq;
 		goto err_put_clk;
 	}
drivers/gpu/drm/exynos/exynos_drm_rotator.c +1 -3
index dafa87b82052..2d94afba031e 100644
@@ -293,10 +293,8 @@ static int rotator_probe(struct platform_device *pdev)
 		return PTR_ERR(rot->regs);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "failed to get irq\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = devm_request_irq(dev, irq, rotator_irq_handler, 0, dev_name(dev),
 			       rot);
drivers/gpu/drm/exynos/exynos_drm_scaler.c +1 -3
index 93c43c8d914e..ce1857138f89 100644
@@ -502,10 +502,8 @@ static int scaler_probe(struct platform_device *pdev)
 		return PTR_ERR(scaler->regs);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "failed to get irq\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = devm_request_threaded_irq(dev, irq, NULL,	scaler_irq_handler,
 					IRQF_ONESHOT, "drm_scaler", scaler);
Signature · 1 line
2.17.1
maintainer
#2 lore raw

Hi Tamseel,

Same patch[1] has been merged. So could you re-post this patch after rebasing it on top of exynos-drm-next branch? After rebase, only g2d part would be valid.

Thanks,
Inki Dae

[1] https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git/commit/?h=exynos-drm-next&id=fdd79b0db1899f915f489e744a06846284fa3f1e

20. 5. 19. 오후 7:49에 Tamseel Shams 이(가) 쓴 글:

Quoted 67 lines

platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle.

Also removing unnecessary curly braces around if () statement.

---
Fixed review comment by [email protected]

 drivers/gpu/drm/exynos/exynos_drm_dsi.c     | 4 +---
 drivers/gpu/drm/exynos/exynos_drm_g2d.c     | 1 -
 drivers/gpu/drm/exynos/exynos_drm_rotator.c | 4 +---
 drivers/gpu/drm/exynos/exynos_drm_scaler.c  | 4 +---
 4 files changed, 3 insertions(+), 10 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +1 -3
index 902938d2568f..958e2c6a6702 100644
@@ -1809,10 +1809,8 @@ static int exynos_dsi_probe(struct platform_device *pdev)
 	}
 
 	dsi->irq = platform_get_irq(pdev, 0);
-	if (dsi->irq < 0) {
-		dev_err(dev, "failed to request dsi irq resource\n");
+	if (dsi->irq < 0)
 		return dsi->irq;
-	}
 
 	irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
 	ret = devm_request_threaded_irq(dev, dsi->irq, NULL,
drivers/gpu/drm/exynos/exynos_drm_g2d.c +0 -1
index fcee33a43aca..03be31427181 100644
@@ -1498,7 +1498,6 @@ static int g2d_probe(struct platform_device *pdev)
 
 	g2d->irq = platform_get_irq(pdev, 0);
 	if (g2d->irq < 0) {
-		dev_err(dev, "failed to get irq\n");
 		ret = g2d->irq;
 		goto err_put_clk;
 	}
drivers/gpu/drm/exynos/exynos_drm_rotator.c +1 -3
index dafa87b82052..2d94afba031e 100644
@@ -293,10 +293,8 @@ static int rotator_probe(struct platform_device *pdev)
 		return PTR_ERR(rot->regs);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "failed to get irq\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = devm_request_irq(dev, irq, rotator_irq_handler, 0, dev_name(dev),
 			       rot);
drivers/gpu/drm/exynos/exynos_drm_scaler.c +0 -0
index 93c43c8d914e..ce1857138f89 100644
@@ -502,10 +502,8 @@ static int scaler_probe(struct platform_device *pdev)
 		return PTR_ERR(scaler->regs);

drivers/gpu/drm/exynos/exynos_drm_scaler.c static int scaler_probe(struct platform_device *pdev) · line 509

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_scaler.c +1 -3
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "failed to get irq\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = devm_request_threaded_irq(dev, irq, NULL,	scaler_irq_handler,
 					IRQF_ONESHOT, "drm_scaler", scaler);

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

#3 lore raw
Quoted 14 lines

-----Original Message-----
From: Inki Dae <[email protected]>
Sent: Wednesday, May 20, 2020 11:08 AM
To: Tamseel Shams <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] drm/exynos: Remove dev_err() on platform_get_irq() failure

Quoted 6 lines

Hi Tamseel,

Same patch[1] has been merged. So could you re-post this patch after rebasing it on top of exynos-drm-next branch?
After rebase, only g2d part would be valid.

Hi Inki Dae,
Thanks for letting me know, I will send updated patch for G2D file.

Thanks & Regards
Tamseel Shams