Message ID | 20210111145445.28854-9-ribalda@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: staging/intel-ipu3 : Do not zero reserved fields | expand |
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; >
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;
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> --- drivers/media/test-drivers/vicodec/vicodec-core.c | 5 ----- 1 file changed, 5 deletions(-)