This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: v4l2-ioctl.c: zero reserved fields for S/TRY_FMT
Author:  Hans Verkuil <hverkuil-ci...@xs4all.nl>
Date:    Sun Nov 10 07:27:04 2019 +0100

v4l2_vbi_format, v4l2_sliced_vbi_format and v4l2_sdr_format
have a reserved array at the end that should be zeroed by drivers
as per the V4L2 spec. Older drivers often do not do this, so just
handle this in the core.

Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mche...@kernel.org>

 drivers/media/v4l2-core/v4l2-ioctl.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

---

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c 
b/drivers/media/v4l2-core/v4l2-ioctl.c
index 60453b21a855..4e700583659b 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1617,12 +1617,12 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
        case V4L2_BUF_TYPE_VBI_CAPTURE:
                if (unlikely(!ops->vidioc_s_fmt_vbi_cap))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.vbi);
+               CLEAR_AFTER_FIELD(p, fmt.vbi.flags);
                return ops->vidioc_s_fmt_vbi_cap(file, fh, arg);
        case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
                if (unlikely(!ops->vidioc_s_fmt_sliced_vbi_cap))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sliced);
+               CLEAR_AFTER_FIELD(p, fmt.sliced.io_size);
                return ops->vidioc_s_fmt_sliced_vbi_cap(file, fh, arg);
        case V4L2_BUF_TYPE_VIDEO_OUTPUT:
                if (unlikely(!ops->vidioc_s_fmt_vid_out))
@@ -1648,22 +1648,22 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
        case V4L2_BUF_TYPE_VBI_OUTPUT:
                if (unlikely(!ops->vidioc_s_fmt_vbi_out))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.vbi);
+               CLEAR_AFTER_FIELD(p, fmt.vbi.flags);
                return ops->vidioc_s_fmt_vbi_out(file, fh, arg);
        case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
                if (unlikely(!ops->vidioc_s_fmt_sliced_vbi_out))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sliced);
+               CLEAR_AFTER_FIELD(p, fmt.sliced.io_size);
                return ops->vidioc_s_fmt_sliced_vbi_out(file, fh, arg);
        case V4L2_BUF_TYPE_SDR_CAPTURE:
                if (unlikely(!ops->vidioc_s_fmt_sdr_cap))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sdr);
+               CLEAR_AFTER_FIELD(p, fmt.sdr.buffersize);
                return ops->vidioc_s_fmt_sdr_cap(file, fh, arg);
        case V4L2_BUF_TYPE_SDR_OUTPUT:
                if (unlikely(!ops->vidioc_s_fmt_sdr_out))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sdr);
+               CLEAR_AFTER_FIELD(p, fmt.sdr.buffersize);
                return ops->vidioc_s_fmt_sdr_out(file, fh, arg);
        case V4L2_BUF_TYPE_META_CAPTURE:
                if (unlikely(!ops->vidioc_s_fmt_meta_cap))
@@ -1719,12 +1719,12 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
        case V4L2_BUF_TYPE_VBI_CAPTURE:
                if (unlikely(!ops->vidioc_try_fmt_vbi_cap))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.vbi);
+               CLEAR_AFTER_FIELD(p, fmt.vbi.flags);
                return ops->vidioc_try_fmt_vbi_cap(file, fh, arg);
        case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE:
                if (unlikely(!ops->vidioc_try_fmt_sliced_vbi_cap))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sliced);
+               CLEAR_AFTER_FIELD(p, fmt.sliced.io_size);
                return ops->vidioc_try_fmt_sliced_vbi_cap(file, fh, arg);
        case V4L2_BUF_TYPE_VIDEO_OUTPUT:
                if (unlikely(!ops->vidioc_try_fmt_vid_out))
@@ -1750,22 +1750,22 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
        case V4L2_BUF_TYPE_VBI_OUTPUT:
                if (unlikely(!ops->vidioc_try_fmt_vbi_out))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.vbi);
+               CLEAR_AFTER_FIELD(p, fmt.vbi.flags);
                return ops->vidioc_try_fmt_vbi_out(file, fh, arg);
        case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
                if (unlikely(!ops->vidioc_try_fmt_sliced_vbi_out))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sliced);
+               CLEAR_AFTER_FIELD(p, fmt.sliced.io_size);
                return ops->vidioc_try_fmt_sliced_vbi_out(file, fh, arg);
        case V4L2_BUF_TYPE_SDR_CAPTURE:
                if (unlikely(!ops->vidioc_try_fmt_sdr_cap))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sdr);
+               CLEAR_AFTER_FIELD(p, fmt.sdr.buffersize);
                return ops->vidioc_try_fmt_sdr_cap(file, fh, arg);
        case V4L2_BUF_TYPE_SDR_OUTPUT:
                if (unlikely(!ops->vidioc_try_fmt_sdr_out))
                        break;
-               CLEAR_AFTER_FIELD(p, fmt.sdr);
+               CLEAR_AFTER_FIELD(p, fmt.sdr.buffersize);
                return ops->vidioc_try_fmt_sdr_out(file, fh, arg);
        case V4L2_BUF_TYPE_META_CAPTURE:
                if (unlikely(!ops->vidioc_try_fmt_meta_cap))

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to