[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49a39f01-3457-e049-d16e-d0d729aa0a73@wanadoo.fr>
Date: Sun, 6 Nov 2022 16:53:02 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: wangkailong@...i.cn, jassisinghbrar@...il.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mailbox: platform-mhu: Remove unnecessary print function
dev_err()
Le 06/11/2022 à 15:25, wangkailong@...i.cn a écrit :
> Eliminate the follow coccicheck warning:
>
> ./drivers/mailbox/platform_mhu.c:139:3-10: line 139 is redundant because
> platform_get_irq() already prints an error
>
> Signed-off-by: KaiLong Wang <wangkailong@...i.cn>
> ---
> drivers/mailbox/platform_mhu.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/mailbox/platform_mhu.c b/drivers/mailbox/platform_mhu.c
> index a5922ac0b0bf..08e0eedea860 100644
> --- a/drivers/mailbox/platform_mhu.c
> +++ b/drivers/mailbox/platform_mhu.c
> @@ -136,7 +136,6 @@ static int platform_mhu_probe(struct platform_device *pdev)
> mhu->chan[i].con_priv = &mhu->mlink[i];
> mhu->mlink[i].irq = platform_get_irq(pdev, i);
> if (mhu->mlink[i].irq < 0) {
> - dev_err(dev, "failed to get irq%d\n", i);
> return mhu->mlink[i].irq;
> }
Hi,
apparently, you sent several patches like this one.
When doing such cleanups, you should also remove the now useless { }
when there is just one statement left, after the "if".
CJ
> mhu->mlink[i].rx_reg = mhu->base + platform_mhu_reg[i];
Powered by blists - more mailing lists