* [PATCH] drm/sprd: remove redundant error logging
@ 2022-12-11 13:55 Deepak R Varma
2022-12-19 20:55 ` Deepak R Varma
2022-12-22 8:07 ` Chunyan Zhang
0 siblings, 2 replies; 4+ messages in thread
From: Deepak R Varma @ 2022-12-11 13:55 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Orson Zhai, Baolin Wang,
Chunyan Zhang, dri-devel, linux-kernel
Cc: Saurabh Singh Sengar, Praveen Kumar, drv
A call to platform_get_irq() already prints an error on failure within
its own implementation. So printing another error based on its return
value in the caller is redundant and should be removed. The clean up
also makes if condition block braces unnecessary. Remove that as well.
Issue identified using platform_get_irq.cocci coccicheck script.
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
drivers/gpu/drm/sprd/sprd_dpu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c
index 88f4259680f1..db0bcea1d9f4 100644
--- a/drivers/gpu/drm/sprd/sprd_dpu.c
+++ b/drivers/gpu/drm/sprd/sprd_dpu.c
@@ -803,10 +803,8 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu,
}
ctx->irq = platform_get_irq(pdev, 0);
- if (ctx->irq < 0) {
- dev_err(dev, "failed to get dpu irq\n");
+ if (ctx->irq < 0)
return ctx->irq;
- }
/* disable and clear interrupts before register dpu IRQ. */
writel(0x00, ctx->base + REG_DPU_INT_EN);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/sprd: remove redundant error logging
2022-12-11 13:55 [PATCH] drm/sprd: remove redundant error logging Deepak R Varma
@ 2022-12-19 20:55 ` Deepak R Varma
2022-12-20 16:13 ` Thomas Zimmermann
2022-12-22 8:07 ` Chunyan Zhang
1 sibling, 1 reply; 4+ messages in thread
From: Deepak R Varma @ 2022-12-19 20:55 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Orson Zhai, Baolin Wang,
Chunyan Zhang, dri-devel, linux-kernel
Cc: Saurabh Singh Sengar, Praveen Kumar, drv
On Sun, Dec 11, 2022 at 07:25:08PM +0530, Deepak R Varma wrote:
Hello,
May I please request a review and feedback on this patch proposal?
Thank you,
./drv
> A call to platform_get_irq() already prints an error on failure within
> its own implementation. So printing another error based on its return
> value in the caller is redundant and should be removed. The clean up
> also makes if condition block braces unnecessary. Remove that as well.
>
> Issue identified using platform_get_irq.cocci coccicheck script.
>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
> drivers/gpu/drm/sprd/sprd_dpu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c
> index 88f4259680f1..db0bcea1d9f4 100644
> --- a/drivers/gpu/drm/sprd/sprd_dpu.c
> +++ b/drivers/gpu/drm/sprd/sprd_dpu.c
> @@ -803,10 +803,8 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu,
> }
>
> ctx->irq = platform_get_irq(pdev, 0);
> - if (ctx->irq < 0) {
> - dev_err(dev, "failed to get dpu irq\n");
> + if (ctx->irq < 0)
> return ctx->irq;
> - }
>
> /* disable and clear interrupts before register dpu IRQ. */
> writel(0x00, ctx->base + REG_DPU_INT_EN);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/sprd: remove redundant error logging
2022-12-19 20:55 ` Deepak R Varma
@ 2022-12-20 16:13 ` Thomas Zimmermann
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2022-12-20 16:13 UTC (permalink / raw)
To: Deepak R Varma, David Airlie, Daniel Vetter, Orson Zhai,
Baolin Wang, Chunyan Zhang, dri-devel, linux-kernel
Cc: Praveen Kumar, Saurabh Singh Sengar
[-- Attachment #1.1: Type: text/plain, Size: 1664 bytes --]
Hi
Am 19.12.22 um 21:55 schrieb Deepak R Varma:
> On Sun, Dec 11, 2022 at 07:25:08PM +0530, Deepak R Varma wrote:
>
> Hello,
> May I please request a review and feedback on this patch proposal?
Added to drm-misc-next. Thanks for the patch.
Best regards
Thomas
>
> Thank you,
> ./drv
>
>> A call to platform_get_irq() already prints an error on failure within
>> its own implementation. So printing another error based on its return
>> value in the caller is redundant and should be removed. The clean up
>> also makes if condition block braces unnecessary. Remove that as well.
>>
>> Issue identified using platform_get_irq.cocci coccicheck script.
>>
>> Signed-off-by: Deepak R Varma <drv@mailo.com>
>> ---
>> drivers/gpu/drm/sprd/sprd_dpu.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c
>> index 88f4259680f1..db0bcea1d9f4 100644
>> --- a/drivers/gpu/drm/sprd/sprd_dpu.c
>> +++ b/drivers/gpu/drm/sprd/sprd_dpu.c
>> @@ -803,10 +803,8 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu,
>> }
>>
>> ctx->irq = platform_get_irq(pdev, 0);
>> - if (ctx->irq < 0) {
>> - dev_err(dev, "failed to get dpu irq\n");
>> + if (ctx->irq < 0)
>> return ctx->irq;
>> - }
>>
>> /* disable and clear interrupts before register dpu IRQ. */
>> writel(0x00, ctx->base + REG_DPU_INT_EN);
>> --
>> 2.34.1
>>
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/sprd: remove redundant error logging
2022-12-11 13:55 [PATCH] drm/sprd: remove redundant error logging Deepak R Varma
2022-12-19 20:55 ` Deepak R Varma
@ 2022-12-22 8:07 ` Chunyan Zhang
1 sibling, 0 replies; 4+ messages in thread
From: Chunyan Zhang @ 2022-12-22 8:07 UTC (permalink / raw)
To: Deepak R Varma
Cc: David Airlie, Daniel Vetter, Orson Zhai, Baolin Wang, dri-devel,
linux-kernel, Saurabh Singh Sengar, Praveen Kumar
On Sun, 11 Dec 2022 at 21:55, Deepak R Varma <drv@mailo.com> wrote:
>
> A call to platform_get_irq() already prints an error on failure within
> its own implementation. So printing another error based on its return
> value in the caller is redundant and should be removed. The clean up
> also makes if condition block braces unnecessary. Remove that as well.
>
> Issue identified using platform_get_irq.cocci coccicheck script.
>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
> drivers/gpu/drm/sprd/sprd_dpu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c
> index 88f4259680f1..db0bcea1d9f4 100644
> --- a/drivers/gpu/drm/sprd/sprd_dpu.c
> +++ b/drivers/gpu/drm/sprd/sprd_dpu.c
> @@ -803,10 +803,8 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu,
> }
>
> ctx->irq = platform_get_irq(pdev, 0);
> - if (ctx->irq < 0) {
> - dev_err(dev, "failed to get dpu irq\n");
> + if (ctx->irq < 0)
Thanks for the patch, it makes sense to me, so
Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>
> return ctx->irq;
> - }
>
> /* disable and clear interrupts before register dpu IRQ. */
> writel(0x00, ctx->base + REG_DPU_INT_EN);
> --
> 2.34.1
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-22 8:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-11 13:55 [PATCH] drm/sprd: remove redundant error logging Deepak R Varma
2022-12-19 20:55 ` Deepak R Varma
2022-12-20 16:13 ` Thomas Zimmermann
2022-12-22 8:07 ` Chunyan Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).