public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Lukasz Stelmach <l.stelmach@samsung.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 20/25] media: samsung: s5p-g2d: Drop unneeded v4l2_m2m_get_vq() NULL check
Date: Fri, 10 Oct 2025 13:00:01 +0200	[thread overview]
Message-ID: <oypijd4is7m37y.fsf%l.stelmach@samsung.com> (raw)
In-Reply-To: <20251008175052.19925-21-laurent.pinchart@ideasonboard.com> (Laurent Pinchart's message of "Wed, 8 Oct 2025 20:50:47 +0300")

[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]

It was <2025-10-08 śro 20:50>, when Laurent Pinchart wrote:
> The v4l2_m2m_get_vq() function never returns NULL. The check was
> probably intended to catch invalid format types, but that's not needed
> as the V4L2 core picks the appropriate VIDIOC_G_FMT ioctl handler based
> on the format type, so the type can't be incorrect. Drop the unneeded
> return value check and, as the return value is not used for other
> purposes and the function has no side effect, the function call as well.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/platform/samsung/s5p-g2d/g2d.c | 4 ----
>  1 file changed, 4 deletions(-)
>

Reviewed-by: Łukasz Stelmach <l.stelmach@samsung.com>

> diff --git a/drivers/media/platform/samsung/s5p-g2d/g2d.c b/drivers/media/platform/samsung/s5p-g2d/g2d.c
> index ffed16a34493..7b0481c7f953 100644
> --- a/drivers/media/platform/samsung/s5p-g2d/g2d.c
> +++ b/drivers/media/platform/samsung/s5p-g2d/g2d.c
> @@ -306,12 +306,8 @@ static int vidioc_enum_fmt(struct file *file, void *prv, struct v4l2_fmtdesc *f)
>  static int vidioc_g_fmt(struct file *file, void *prv, struct v4l2_format *f)
>  {
>  	struct g2d_ctx *ctx = prv;
> -	struct vb2_queue *vq;
>  	struct g2d_frame *frm;
>  
> -	vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type);
> -	if (!vq)
> -		return -EINVAL;
>  	frm = get_frame(ctx, f->type);
>  	if (IS_ERR(frm))
>  		return PTR_ERR(frm);

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2025-10-10 11:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251008175052.19925-1-laurent.pinchart@ideasonboard.com>
2025-10-08 17:50 ` [PATCH 03/25] media: meson-g2d: Drop unneeded v4l2_m2m_get_vq() NULL check Laurent Pinchart
2025-10-08 18:13   ` Neil Armstrong
2025-10-08 17:50 ` [PATCH 08/25] media: mediatek: jpeg: " Laurent Pinchart
2025-10-08 17:50 ` [PATCH 09/25] media: mediatek: vcodec: " Laurent Pinchart
2025-10-08 17:50 ` [PATCH 11/25] media: imx-jpeg: " Laurent Pinchart
2025-10-08 20:01   ` Frank Li
2025-10-08 17:50 ` [PATCH 12/25] media: imx-pxp: " Laurent Pinchart
2025-10-08 20:02   ` Frank Li
2025-10-09  8:11   ` Philipp Zabel
2025-10-08 17:50 ` [PATCH 13/25] media: nxp: imx8-isi: " Laurent Pinchart
2025-10-08 20:02   ` Frank Li
2025-10-08 17:50 ` [PATCH 19/25] media: platform: rga: " Laurent Pinchart
2025-10-08 17:50 ` [PATCH 20/25] media: samsung: s5p-g2d: " Laurent Pinchart
2025-10-10 11:00   ` Lukasz Stelmach [this message]
2025-10-08 17:50 ` [PATCH 21/25] media: samsung: s5p-jpeg: " Laurent Pinchart
2025-10-08 17:50 ` [PATCH 22/25] media: stm32: dma2d: " 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=oypijd4is7m37y.fsf%l.stelmach@samsung.com \
    --to=l.stelmach@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=nicolas.dufresne@collabora.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