mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>,
	tiffany.lin@mediatek.com,  andrew-ct.chen@mediatek.com,
	yunfei.dong@mediatek.com, mchehab@kernel.org,
	 matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	 hverkuil+cisco@kernel.org, laurent.pinchart@ideasonboard.com,
	 p.zabel@pengutronix.de, benjamin.gaignard@collabora.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 2/4] media: mediatek: vcodec: remove redundant return value of vdec_vp9_slice_setup_prob_buffer()
Date: Wed, 15 Jul 2026 17:30:37 -0400	[thread overview]
Message-ID: <84fb82b5f765c98d1e22af9e60658df2d42ba016.camel@ndufresne.ca> (raw)
In-Reply-To: <20260506084203.202882-3-lihaoxiang@isrc.iscas.ac.cn>

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

Le mercredi 06 mai 2026 à 16:42 +0800, Haoxiang Li a écrit :
> vdec_vp9_slice_setup_prob_buffer() never fails, remove 'return 0' from
> vdec_vp9_slice_setup_prob_buffer() and modify its signature.
> Also, remove the return value check in vdec_vp9_slice_setup_single()
> and vdec_vp9_slice_setup_lat().
> 
> Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  .../vcodec/decoder/vdec/vdec_vp9_req_lat_if.c       | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> index 092fd34e21d2..0f47b2671353 100644
> ---
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> +++
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> @@ -1013,7 +1013,7 @@ static void vdec_vp9_slice_setup_lat_buffer(struct
> vdec_vp9_slice_instance *inst
>  	vsi->row_info.size = 0;
>  }
>  
> -static int vdec_vp9_slice_setup_prob_buffer(struct vdec_vp9_slice_instance
> *instance,
> +static void vdec_vp9_slice_setup_prob_buffer(struct vdec_vp9_slice_instance
> *instance,
>  					    struct vdec_vp9_slice_vsi *vsi)
>  {
>  	struct vdec_vp9_slice_frame_ctx *frame_ctx;
> @@ -1030,8 +1030,6 @@ static int vdec_vp9_slice_setup_prob_buffer(struct
> vdec_vp9_slice_instance *inst
>  	else
>  		frame_ctx = vdec_vp9_slice_default_frame_ctx;
>  	memcpy(instance->prob.va, frame_ctx, sizeof(*frame_ctx));
> -
> -	return 0;
>  }
>  
>  static void vdec_vp9_slice_setup_seg_buffer(struct vdec_vp9_slice_instance
> *instance,
> @@ -1170,9 +1168,7 @@ static int vdec_vp9_slice_setup_lat(struct
> vdec_vp9_slice_instance *instance,
>  
>  	/* setup prob/tile buffers for LAT */
>  
> -	ret = vdec_vp9_slice_setup_prob_buffer(instance, vsi);
> -	if (ret)
> -		goto err;
> +	vdec_vp9_slice_setup_prob_buffer(instance, vsi);
>  
>  	ret = vdec_vp9_slice_setup_tile_buffer(instance, vsi, bs);
>  	if (ret)
> @@ -1804,10 +1800,7 @@ static int vdec_vp9_slice_setup_single(struct
> vdec_vp9_slice_instance *instance,
>  
>  	vdec_vp9_slice_setup_single_buffer(instance, pfc, vsi, bs, fb);
>  	vdec_vp9_slice_setup_seg_buffer(instance, vsi, &instance->seg[0]);
> -
> -	ret = vdec_vp9_slice_setup_prob_buffer(instance, vsi);
> -	if (ret)
> -		goto err;
> +	vdec_vp9_slice_setup_prob_buffer(instance, vsi);
>  
>  	ret = vdec_vp9_slice_setup_tile_buffer(instance, vsi, bs);
>  	if (ret)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-07-15 21:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06  8:41 [PATCH 0/4] media: mediatek: vcodec: VP9 slice setup cleanups and fixes Haoxiang Li
2026-05-06  8:42 ` [PATCH 1/4] media: mediatek: vcodec: remove redundant return value of vdec_vp9_slice_setup_lat_buffer() Haoxiang Li
2026-07-15 21:29   ` Nicolas Dufresne
2026-05-06  8:42 ` [PATCH 2/4] media: mediatek: vcodec: remove redundant return value of vdec_vp9_slice_setup_prob_buffer() Haoxiang Li
2026-07-15 21:30   ` Nicolas Dufresne [this message]
2026-05-06  8:42 ` [PATCH 3/4] media: mediatek: vcodec: free working buf on error path in vdec_vp9_slice_setup_lat() Haoxiang Li
2026-07-15 21:35   ` Nicolas Dufresne
2026-07-15 21:46     ` Nicolas Dufresne
2026-05-06  8:42 ` [PATCH 4/4] media: mediatek: vcodec: free working buf in vdec_vp9_slice_setup_single() Haoxiang Li
2026-07-15 21:35   ` Nicolas Dufresne
2026-05-06 15:02 ` [PATCH 0/4] media: mediatek: vcodec: VP9 slice setup cleanups and fixes Nicolas Dufresne

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=84fb82b5f765c98d1e22af9e60658df2d42ba016.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lihaoxiang@isrc.iscas.ac.cn \
    --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=p.zabel@pengutronix.de \
    --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

all inboxes | Powered by JetHome®