lkml.org 
[lkml]   [2021]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 8/9] media: vicodec: Do not zero reserved fields
From
Date
Hi Ricardo,

On 11/01/2021 14:54, Ricardo Ribalda wrote:
> Core code already clears reserved fields of struct
> v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
> v4l2_plane_pix_format reserved fields").
>
> Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>


> ---
> drivers/media/test-drivers/vicodec/vicodec-core.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/media/test-drivers/vicodec/vicodec-core.c b/drivers/media/test-drivers/vicodec/vicodec-core.c
> index 025f3ff77302..33f1c893c1b6 100644
> --- a/drivers/media/test-drivers/vicodec/vicodec-core.c
> +++ b/drivers/media/test-drivers/vicodec/vicodec-core.c
> @@ -811,9 +811,6 @@ static int vidioc_g_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f)
> pix_mp->xfer_func = ctx->state.xfer_func;
> pix_mp->ycbcr_enc = ctx->state.ycbcr_enc;
> pix_mp->quantization = ctx->state.quantization;
> - memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved));
> - memset(pix_mp->plane_fmt[0].reserved, 0,
> - sizeof(pix_mp->plane_fmt[0].reserved));
> break;
> default:
> return -EINVAL;
> @@ -886,8 +883,6 @@ static int vidioc_try_fmt(struct vicodec_ctx *ctx, struct v4l2_format *f)
> info->sizeimage_mult / info->sizeimage_div;
> if (pix_mp->pixelformat == V4L2_PIX_FMT_FWHT)
> plane->sizeimage += sizeof(struct fwht_cframe_hdr);
> - memset(pix_mp->reserved, 0, sizeof(pix_mp->reserved));
> - memset(plane->reserved, 0, sizeof(plane->reserved));
> break;
> default:
> return -EINVAL;
>

\
 
 \ /
  Last update: 2021-01-12 12:47    [W:0.141 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site