Skip to contentSkip to conversation

drm: Remove unnecessary print function dev_err()

PATCH Applied Yang Li 2 participants 3 messages Jun 13, 2022 – Jun 24, 2022

Subsystems (3)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 drm: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because platform_get_irq() already prints an error.

Eliminate the follow coccicheck warning:
./drivers/gpu/drm/logicvc/logicvc_drm.c:352:2-9: line 352 is redundant because platform_get_irq() already prints an error

---
 drivers/gpu/drm/logicvc/logicvc_drm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/logicvc/logicvc_drm.c +0 -1
index df1805cf0f95..437b3011ae1e 100644
@@ -349,7 +349,6 @@ static int logicvc_drm_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(dev, "Failed to get IRQ\n");
 		ret = -ENODEV;
 		goto error_reserved_mem;
 	}
Signature · 1 line
2.20.1.7.g153144c
Acked-by on v1 1/1
#1 lore raw

Hi Yang,

Quoted 9 lines · Yang Li

The print function dev_err() is redundant because platform_get_irq() already prints an error.

Eliminate the follow coccicheck warning:
./drivers/gpu/drm/logicvc/logicvc_drm.c:352:2-9: line 352 is redundant because platform_get_irq() already prints an error

Thanks for the patch!

Paul

Quoted 19 lines
---
 drivers/gpu/drm/logicvc/logicvc_drm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/logicvc/logicvc_drm.c +0 -1
index df1805cf0f95..437b3011ae1e 100644
@@ -349,7 +349,6 @@ static int logicvc_drm_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(dev, "Failed to get IRQ\n");
 		ret = -ENODEV;
 		goto error_reserved_mem;
 	}
Signature · 1 line
2.20.1.7.g153144c
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#2 lore raw

Hi,

Quoted 10 lines · Paul Kocialkowski

Hi Yang,

Quoted 7 lines · Yang Li

The print function dev_err() is redundant because platform_get_irq() already prints an error.

Eliminate the follow coccicheck warning:
./drivers/gpu/drm/logicvc/logicvc_drm.c:352:2-9: line 352 is redundant because platform_get_irq() already prints an error

Quoted 6 lines
Quoted 2 lines

Thanks for the patch!

Pushed to drm-misc-next, thanks!

Paul

Quoted 24 lines
Quoted 19 lines
---
 drivers/gpu/drm/logicvc/logicvc_drm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/logicvc/logicvc_drm.c +0 -1
index df1805cf0f95..437b3011ae1e 100644
@@ -349,7 +349,6 @@ static int logicvc_drm_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(dev, "Failed to get IRQ\n");
 		ret = -ENODEV;
 		goto error_reserved_mem;
 	}
Signature · 1 line
2.20.1.7.g153144c
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com