Skip to contentSkip to conversation

drm/fsl-dcu: Remove redundant dev_err()

PATCH Applied Chen Ni 3 participants 4 messages Sep 18, 2024 – Oct 19, 2024

Subsystems (3)
lore
Share & tools
lore

Chen Ni

author
#0 lore raw

PATCH 1/1 drm/fsl-dcu: Remove redundant dev_err()

There is no need to call the dev_err() function directly to print a custom message when handling an error from platform_get_irq() function as it is going to display an appropriate error message in case of a failure.

---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +1 -3
index ab6c0c6cd0e2..ad026d77a051 100644
@@ -272,10 +272,8 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
 	}
 
 	fsl_dev->irq = platform_get_irq(pdev, 0);
-	if (fsl_dev->irq < 0) {
-		dev_err(dev, "failed to get irq\n");
+	if (fsl_dev->irq < 0)
 		return fsl_dev->irq;
-	}
 
 	fsl_dev->regmap = devm_regmap_init_mmio(dev, base,
 			&fsl_dcu_regmap_config);
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Chen Ni

There is no need to call the dev_err() function directly to print a custom message when handling an error from platform_get_irq() function as it is going to display an appropriate error message in case of a failure.

---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#2 lore raw
In reply to Chen Ni
Quoted 4 lines

There is no need to call the dev_err() function directly to print a custom message when handling an error from platform_get_irq() function as it is going to display an appropriate error message in case of a failure.

Can such a change description become a bit nicer with an additional imperative wording?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.12-rc1#n94

Regards,
Markus

#3 lore raw
In reply to Chen Ni
Quoted 6 lines · Chen Ni

There is no need to call the dev_err() function directly to print a custom message when handling an error from platform_get_irq() function as it is going to display an appropriate error message in case of a failure.

Applied to drm-misc-next, thanks!

[1/1] drm/fsl-dcu: Remove redundant dev_err()

      commit: 4b173d34e35726d7727d3e5edc43bcab12654ab0

Best regards,

Signature · 2 lines
With best wishes
Dmitry