[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAfSe-sa2Vw7bUxuRne-fw7GZrHW+7OMj6gCS9jPTamsGF5MBQ@mail.gmail.com>
Date: Thu, 22 Dec 2022 16:07:54 +0800
From: Chunyan Zhang <zhang.lyra@...il.com>
To: Deepak R Varma <drv@...lo.com>
Cc: David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Saurabh Singh Sengar <ssengar@...rosoft.com>,
Praveen Kumar <kumarpraveen@...ux.microsoft.com>
Subject: Re: [PATCH] drm/sprd: remove redundant error logging
On Sun, 11 Dec 2022 at 21:55, Deepak R Varma <drv@...lo.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@...lo.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@...il.com>
> return ctx->irq;
> - }
>
> /* disable and clear interrupts before register dpu IRQ. */
> writel(0x00, ctx->base + REG_DPU_INT_EN);
> --
> 2.34.1
>
>
>
Powered by blists - more mailing lists