From: Miles Chen <miles.chen@mediatek.com>
To: <yang.lee@linux.alibaba.com>
Cc: <abaci@linux.alibaba.com>, <andrew-ct.chen@mediatek.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>, <matthias.bgg@gmail.com>,
<mchehab@kernel.org>, <tiffany.lin@mediatek.com>
Subject: Re: [PATCH -next] media: platform: Remove unnecessary print function dev_err()
Date: Wed, 16 Mar 2022 16:18:39 +0800 [thread overview]
Message-ID: <20220316081839.22093-1-miles.chen@mediatek.com> (raw)
In-Reply-To: <20220316001411.80167-1-yang.lee@linux.alibaba.com>
Hi Yang,
>The print function dev_err() is redundant because platform_get_irq()
>already prints an error.
>
>Eliminate the follow coccicheck warnings:
>./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c:119:2-9:
>line 119 is redundant because platform_get_irq() already prints an error
>./drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c:103:2-9:
>line 103 is redundant because platform_get_irq() already prints an error
>
>Reported-by: Abaci Robot <abaci@linux.alibaba.com>
>Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
>---
> drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 4 +---
> drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
>index 48dad9bb13d2..df7b25e9cbc8 100644
>--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
>+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
>@@ -115,10 +115,8 @@ static int mtk_vcodec_init_dec_resources(struct mtk_vcodec_dev *dev)
> return 0;
>
> dev->dec_irq = platform_get_irq(pdev, 0);
>- if (dev->dec_irq < 0) {
>- dev_err(&pdev->dev, "failed to get irq number");
>+ if (dev->dec_irq < 0)
> return dev->dec_irq;
>- }
>
Thanks for the patch,
Yihao has submitted a patch to fix mtk_vcodec_init_dec_resources() [1]
[1] https://lore.kernel.org/lkml/20220310023645.10082-1-hanyihao@vivo.com/
> irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
> ret = devm_request_irq(&pdev->dev, dev->dec_irq,
>diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
>index 8d2a641d92f1..5f07313676bb 100644
>--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
>+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
>@@ -99,10 +99,8 @@ static int mtk_vdec_hw_init_irq(struct mtk_vdec_hw_dev *dev)
> int ret;
>
> dev->dec_irq = platform_get_irq(pdev, 0);
>- if (dev->dec_irq < 0) {
>- dev_err(&pdev->dev, "Failed to get irq resource");
>+ if (dev->dec_irq < 0)
> return dev->dec_irq;
>- }
>
> irq_set_status_flags(dev->dec_irq, IRQ_NOAUTOEN);
> ret = devm_request_irq(&pdev->dev, dev->dec_irq,
Would you mind submitting mtk_vdec_hw_init_irq() part by another patch?
Thanks,
Miles
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-03-16 8:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 0:14 [PATCH -next] media: platform: Remove unnecessary print function dev_err() Yang Li
2022-03-16 8:18 ` Miles Chen [this message]
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=20220316081839.22093-1-miles.chen@mediatek.com \
--to=miles.chen@mediatek.com \
--cc=abaci@linux.alibaba.com \
--cc=andrew-ct.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=tiffany.lin@mediatek.com \
--cc=yang.lee@linux.alibaba.com \
/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 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).