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

Subject: media: videodev2: Fix v4l2_ext_control packing.
Author:  Ricardo Ribalda <riba...@chromium.org>
Date:    Wed Apr 10 12:24:39 2024 +0000

The structure is packed, which requires that all its fields need to be
also packed.

./include/uapi/linux/videodev2.h:1810:2: warning: field  within 'struct 
v4l2_ext_control' is less aligned than 'union v4l2_ext_control::(anonymous at 
./include/uapi/linux/videodev2.h:1810:2)' and is usually due to 'struct 
v4l2_ext_control' being packed, which can lead to unaligned accesses 
[-Wunaligned-access]

Explicitly set the inner union as packed.

Marking the inner union as 'packed' does not change the layout, since the
whole struct is already packed, it just silences the clang warning. See
also this llvm discussion:

https://github.com/llvm/llvm-project/issues/55520

Signed-off-by: Ricardo Ribalda <riba...@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 include/uapi/linux/videodev2.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 2663213b76a4..bf12860d570a 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1842,7 +1842,7 @@ struct v4l2_ext_control {
                struct v4l2_ctrl_hdr10_cll_info __user *p_hdr10_cll_info;
                struct v4l2_ctrl_hdr10_mastering_display __user 
*p_hdr10_mastering_display;
                void __user *ptr;
-       };
+       } __attribute__ ((packed));
 } __attribute__ ((packed));
 
 struct v4l2_ext_controls {

Reply via email to