2022-03-03 02:36:06

by Yang Li

[permalink] [raw]
Subject: [PATCH -next] drm/fsl-dcu: 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/fsl-dcu/fsl_dcu_drm_drv.c:277:2-9: line 277 is
redundant because platform_get_irq() already prints an error

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Yang Li <[email protected]>
---
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
index 7a503bf08d0f..20895ea79739 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -273,10 +273,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);
--
2.20.1.7.g153144c


2022-03-04 08:42:13

by Alison Wang

[permalink] [raw]
Subject: RE: [EXT] [PATCH -next] drm/fsl-dcu: Remove unnecessary print function dev_err()

Acked-by: Alison Wang <[email protected]>


Best Regards,
Alison Wang


-----Original Message-----
From: Yang Li <[email protected]>
Sent: 2022??3??3?? 10:30
To: Alison Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Yang Li <[email protected]>; Abaci Robot <[email protected]>
Subject: [EXT] [PATCH -next] drm/fsl-dcu: Remove unnecessary print function dev_err()

Caution: EXT Email

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

Eliminate the follow coccicheck warning:
./drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c:277:2-9: line 277 is redundant because platform_get_irq() already prints an error

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Yang Li <[email protected]>
---
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
index 7a503bf08d0f..20895ea79739 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
@@ -273,10 +273,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);
--[Alison Wang] r
2.20.1.7.g153144c