All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deepak R Varma <drv@mailo.com>
To: Stefan Agner <stefan@agner.ch>, Alison Wang <alison.wang@nxp.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Praveen Kumar <kumarpraveen@linux.microsoft.com>,
	drv@mailo.com, Saurabh Singh Sengar <ssengar@microsoft.com>
Subject: Re: [PATCH] drm/fsl-dcu: Remove redundant error logging
Date: Tue, 20 Dec 2022 02:24:50 +0530	[thread overview]
Message-ID: <Y6DPmlBgNGeH+TvU@qemulion> (raw)
In-Reply-To: <Y5Wwo6Gr1rJOdf3B@qemulion>

On Sun, Dec 11, 2022 at 03:57:47PM +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/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 8579c7629f5e..1ba7d95e1956 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> @@ -272,10 +272,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.34.1
>



WARNING: multiple messages have this Message-ID (diff)
From: Deepak R Varma <drv@mailo.com>
To: Stefan Agner <stefan@agner.ch>, Alison Wang <alison.wang@nxp.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Saurabh Singh Sengar <ssengar@microsoft.com>,
	Praveen Kumar <kumarpraveen@linux.microsoft.com>,
	drv@mailo.com
Subject: Re: [PATCH] drm/fsl-dcu: Remove redundant error logging
Date: Tue, 20 Dec 2022 02:24:50 +0530	[thread overview]
Message-ID: <Y6DPmlBgNGeH+TvU@qemulion> (raw)
In-Reply-To: <Y5Wwo6Gr1rJOdf3B@qemulion>

On Sun, Dec 11, 2022 at 03:57:47PM +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/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 8579c7629f5e..1ba7d95e1956 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> @@ -272,10 +272,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.34.1
>



  reply	other threads:[~2022-12-19 20:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-11 10:27 [PATCH] drm/fsl-dcu: Remove redundant error logging Deepak R Varma
2022-12-11 10:27 ` Deepak R Varma
2022-12-19 20:54 ` Deepak R Varma [this message]
2022-12-19 20:54   ` Deepak R Varma
2022-12-20  7:32 ` Stefan Agner
2022-12-20  7:32   ` Stefan Agner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y6DPmlBgNGeH+TvU@qemulion \
    --to=drv@mailo.com \
    --cc=airlied@gmail.com \
    --cc=alison.wang@nxp.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kumarpraveen@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ssengar@microsoft.com \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.