Skip to contentSkip to conversation

video: fbdev: pxa168fb: Remove unnecessary print function dev_err()

PATCH Superseded Yang Li 2 participants 3 messages Feb 1, 2022 Framebuffer layer

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/2 video: fbdev: pxa168fb: 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/video/fbdev/pxa168fb.c:621:2-9: line 621 is redundant because platform_get_irq() already prints an error

---
 drivers/video/fbdev/pxa168fb.c | 1 -
 1 file changed, 1 deletion(-)
drivers/video/fbdev/pxa168fb.c +0 -1
index c25739f6934d..d533c0bf7031 100644
@@ -618,7 +618,6 @@ static int pxa168fb_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(&pdev->dev, "no IRQ defined\n");
 		return -ENOENT;
 	}
 
Signature · 1 line
2.20.1.7.g153144c
author
#1 lore raw

PATCH 2/2 video: fbdev: pxa3xx-gcu: 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/video/fbdev/pxa3xx-gcu.c:615:2-9: line 615 is redundant because platform_get_irq() already prints an error

---
 drivers/video/fbdev/pxa3xx-gcu.c | 1 -
 1 file changed, 1 deletion(-)
drivers/video/fbdev/pxa3xx-gcu.c +0 -1
index 9239ecd34169..ea52c018bb51 100644
@@ -612,7 +612,6 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev)
 	/* request the IRQ */
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(dev, "no IRQ defined: %d\n", irq);
 		return irq;
 	}
 
Signature · 1 line
2.20.1.7.g153144c
maintainer
#2 lore raw
In reply to Yang Li
Quoted 18 lines · Yang Li

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

Eliminate the follow coccicheck warning:
./drivers/video/fbdev/pxa168fb.c:621:2-9: line 621 is redundant because platform_get_irq() already prints an error

---
 drivers/video/fbdev/pxa168fb.c | 1 -
 1 file changed, 1 deletion(-)
drivers/video/fbdev/pxa168fb.c +0 -0
index c25739f6934d..d533c0bf7031 100644

drivers/video/fbdev/pxa168fb.c static int pxa168fb_probe(struct platform_device *pdev) · line 622

Quoted 6 lines
drivers/video/fbdev/pxa168fb.c +0 -1
@@ -618,7 +618,6 @@ static int pxa168fb_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(&pdev->dev, "no IRQ defined\n");
 		return -ENOENT;
 	}

Please drop the surrounding braces then as well in both of your patches, e.g.

	if (irq < 0)
		return -ENOENT;

Helge