From: Chen-Yu Tsai <wenst@chromium.org>
To: Irui Wang <irui.wang@mediatek.com>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Tiffany Lin <tiffany.lin@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
angelogioacchino.delregno@collabora.com,
Maoguang Meng <maoguang.meng@mediatek.com>,
Longfei Wang <longfei.wang@mediatek.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org,
Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v2, 4/6] media: mediatek: vcodec: Remove encoder driver get IRQ resource
Date: Fri, 26 Aug 2022 12:08:49 +0800 [thread overview]
Message-ID: <CAGXv+5Eqcv-K1O-5foTcHYXKh+0yipo-i+EjgYOMemS3_82fAQ@mail.gmail.com> (raw)
In-Reply-To: <20220720085731.11011-5-irui.wang@mediatek.com>
Hi,
On Wed, Jul 20, 2022 at 4:58 PM Irui Wang <irui.wang@mediatek.com> wrote:
>
> The "platform_get_resource(pdev, IORESOURCE_IRQ, 0)" is no longer
> used after commit a1a2b7125e107("of/platform: Drop static setup of
> IRQ resource from DT core"), so just remove the function in
> encoder driver to avoid driver probe failed.
>
> Signed-off-by: Irui Wang <irui.wang@mediatek.com>
> ---
> .../media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
> index ea667b867b56..6d8964fb4fa2 100644
> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c
> @@ -228,7 +228,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
> {
> struct mtk_vcodec_dev *dev;
> struct video_device *vfd_enc;
> - struct resource *res;
> phandle rproc_phandle;
> enum mtk_vcodec_fw_type fw_type;
> int ret;
> @@ -272,13 +271,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
> goto err_res;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (res == NULL) {
> - dev_err(&pdev->dev, "failed to get irq resource");
> - ret = -ENOENT;
> - goto err_res;
> - }
> -
> dev->enc_irq = platform_get_irq(pdev, 0);
platform_get_irq() returns a negative number on failure. You should
check for errors here as the previous check was removed.
The description of platform_get_irq() explicitly mentions:
Device drivers should check the return value for errors so as to
not pass a negative integer value to the request_irq() APIs.
Hans has queued up this patch, so maybe you could provide a follow-up
patch to fix this?
Regards
ChenYu
> irq_set_status_flags(dev->enc_irq, IRQ_NOAUTOEN);
> ret = devm_request_irq(&pdev->dev, dev->enc_irq,
> --
> 2.18.0
>
next prev parent reply other threads:[~2022-08-26 4:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 8:57 [PATCH v2, 0/6] support mt8188 h264 encoder Irui Wang
2022-07-20 8:57 ` [PATCH v2, 1/6] media: mediatek: vcodec: Add encoder driver support for 34-bit iova Irui Wang
2022-07-20 8:57 ` [PATCH v2, 2/6] dt-bindings: media: mediatek: vcodec: Add encoder dt-bindings for mt8188 Irui Wang
2022-07-25 22:19 ` Rob Herring
2022-07-20 8:57 ` [PATCH v2, 3/6] media: mediatek: vcodec: Add mt8188 encoder driver Irui Wang
2022-07-20 8:57 ` [PATCH v2, 4/6] media: mediatek: vcodec: Remove encoder driver get IRQ resource Irui Wang
2022-08-26 4:08 ` Chen-Yu Tsai [this message]
2022-08-26 9:46 ` Irui Wang
2022-07-20 8:57 ` [PATCH v2, 5/6] media: mediatek: vcodec: Fix bitstream crop information error Irui Wang
2022-07-20 8:57 ` [PATCH v2, 6/6] media: mediatek: vcodec: Use ctx vb2_queue mutex instead of device mutex Irui Wang
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=CAGXv+5Eqcv-K1O-5foTcHYXKh+0yipo-i+EjgYOMemS3_82fAQ@mail.gmail.com \
--to=wenst@chromium.org \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=andrew-ct.chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=irui.wang@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=longfei.wang@mediatek.com \
--cc=maoguang.meng@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=srv_heupstream@mediatek.com \
--cc=tiffany.lin@mediatek.com \
--cc=yunfei.dong@mediatek.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).