From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Subject: Re: [PATCH 15/25] media: qcom: iris: Drop unneeded v4l2_m2m_get_vq() NULL check
Date: Fri, 10 Oct 2025 14:14:24 +0300 [thread overview]
Message-ID: <20251010111424.GA28598@pendragon.ideasonboard.com> (raw)
In-Reply-To: <e9e353e5-76b4-49a1-e845-c8fb3be91a62@oss.qualcomm.com>
Hi Dikshita,
On Thu, Oct 09, 2025 at 07:23:20PM +0530, Dikshita Agarwal wrote:
> On 10/8/2025 11:20 PM, Laurent Pinchart wrote:
> > The v4l2_m2m_get_vq() function never returns NULL. The check may have
> > been intended to catch invalid format types, but that's not needed as
> > the V4L2 core picks the appropriate VIDIOC_S_FMT ioctl handler based on
> > the format type, so the type can't be incorrect. Drop the unneeded
> > return value check.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > drivers/media/platform/qcom/iris/iris_vdec.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c
> > index d670b51c5839..1e9ffdbb6e18 100644
> > --- a/drivers/media/platform/qcom/iris/iris_vdec.c
> > +++ b/drivers/media/platform/qcom/iris/iris_vdec.c
> > @@ -191,8 +191,6 @@ int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f)
> > u32 codec_align;
> >
> > q = v4l2_m2m_get_vq(inst->m2m_ctx, f->type);
> > - if (!q)
> > - return -EINVAL;
> >
> > if (vb2_is_busy(q))
> > return -EBUSY;
>
> The same change would be required for iris_venc.c as well which is part of
> linux-next[1]
Thank you for noticing. I'll rebase this series on v6.18-rc1 once it
gets released and will make sure iris_venc.c is addressed.
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/media/platform/qcom/iris/iris_venc.c#n271
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2025-10-10 11:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 17:50 [PATCH 00/25] media: v4l2-mem2mem: Reduce cargo-cult Laurent Pinchart
2025-10-08 17:50 ` [PATCH 15/25] media: qcom: iris: Drop unneeded v4l2_m2m_get_vq() NULL check Laurent Pinchart
2025-10-08 23:51 ` Bryan O'Donoghue
2025-10-09 13:53 ` Dikshita Agarwal
2025-10-10 11:14 ` Laurent Pinchart [this message]
2025-10-08 17:50 ` [PATCH 16/25] media: qcom: venus: " Laurent Pinchart
2025-10-08 23:52 ` Bryan O'Donoghue
2025-10-09 7:42 ` Dikshita Agarwal
2025-10-08 18:24 ` [PATCH 00/25] media: v4l2-mem2mem: Reduce cargo-cult Nicolas Dufresne
2025-10-08 19:21 ` Laurent Pinchart
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=20251010111424.GA28598@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=abhinav.kumar@linux.dev \
--cc=bryan.odonoghue@linaro.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=quic_vgarodia@quicinc.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