Skip to contentSkip to conversation

drm/etnaviv: Remove redundant dev_err()

PATCH Superseded Kang Minchul 2 participants 3 messages Dec 11, 2022 – Dec 12, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/etnaviv: Remove redundant dev_err()

Function dev_err() is redundant because platform_get_irq() already prints an error.

---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -1
index a31eeff2b297..097fa9034ee8 100644
@@ -1771,7 +1771,6 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
 	/* Get Interrupt: */
 	gpu->irq = platform_get_irq(pdev, 0);
 	if (gpu->irq < 0) {
-		dev_err(dev, "failed to get irq: %d\n", gpu->irq);
 		return gpu->irq;
 	}
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 14 lines · Kang Minchul

Function dev_err() is redundant because platform_get_irq() already prints an error.

---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -0
index a31eeff2b297..097fa9034ee8 100644

drivers/gpu/drm/etnaviv/etnaviv_gpu.c static int etnaviv_gpu_platform_probe(struct platform_device *pdev) · line 1775

Quoted 6 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -1
@@ -1771,7 +1771,6 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
        /* Get Interrupt: */
        gpu->irq = platform_get_irq(pdev, 0);
        if (gpu->irq < 0) {
-               dev_err(dev, "failed to get irq: %d\n", gpu->irq);
                return gpu->irq;
        }

If the dev_err() line is removed, then the { and } should be removed as well.

#2 lore raw

2022년 12월 12일 (월) 오전 3:18, Fabio Estevam <[email protected]>님이 작성:

Quoted 11 lines · Kang Minchul
Quoted 9 lines

Function dev_err() is redundant because platform_get_irq() already prints an error.

---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 13 lines

drivers/gpu/drm/etnaviv/etnaviv_gpu.c static int etnaviv_gpu_platform_probe(struct platform_device *pdev) · line 1775

Quoted 11 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0 -1
index a31eeff2b297..097fa9034ee8 100644
@@ -1771,7 +1771,6 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev)
        /* Get Interrupt: */
        gpu->irq = platform_get_irq(pdev, 0);
        if (gpu->irq < 0) {
-               dev_err(dev, "failed to get irq: %d\n", gpu->irq);
                return gpu->irq;
        }

If the dev_err() line is removed, then the { and } should be removed as well.

Oh, I see.
I just sent patch v2 that reflects your feedback.

Regards,
Kang Minchul