mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
media: videodev2: Fix v4l2_ext_control packing.
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 <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
2abcd952e1
commit
81741e804e
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user