uapi headers: simplify the <linux/compiler.h> stuff.
We don't really need <linux/compiler.h> and <linux/compiler_types.h>. We
already have a mechanism to remove unused macros, so let's do that. We
don't currently have a way to remove unused #includes, so we still need
<linux/compiler.h> and <linux/compiler_types.h> files (but I've clarified
the comments in them).
I've kept the empty definitions of `__user` and `__force` for source
compatibility. (We had one security test at least that was assuming
a kernel struct definition will "just work".)
Bug: http://b/262917450
Test: treehugger
Change-Id: Iacbbbc1aeef9a4fac52dabd7811ab875cc267d4f
diff --git a/libc/kernel/uapi/linux/videodev2.h b/libc/kernel/uapi/linux/videodev2.h
index d418fd2..4fb0a25 100644
--- a/libc/kernel/uapi/linux/videodev2.h
+++ b/libc/kernel/uapi/linux/videodev2.h
@@ -650,7 +650,7 @@
#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040
struct v4l2_clip {
struct v4l2_rect c;
- struct v4l2_clip __user * next;
+ struct v4l2_clip * next;
};
struct v4l2_window {
struct v4l2_rect w;
@@ -658,7 +658,7 @@
__u32 chromakey;
struct v4l2_clip * clips;
__u32 clipcount;
- void __user * bitmap;
+ void * bitmap;
__u8 global_alpha;
};
struct v4l2_captureparm {
@@ -895,32 +895,32 @@
union {
__s32 value;
__s64 value64;
- char __user * string;
- __u8 __user * p_u8;
- __u16 __user * p_u16;
- __u32 __user * p_u32;
- __u32 __user * p_s32;
- __u32 __user * p_s64;
- struct v4l2_area __user * p_area;
- struct v4l2_ctrl_h264_sps __user * p_h264_sps;
+ char * string;
+ __u8 * p_u8;
+ __u16 * p_u16;
+ __u32 * p_u32;
+ __u32 * p_s32;
+ __u32 * p_s64;
+ struct v4l2_area * p_area;
+ struct v4l2_ctrl_h264_sps * p_h264_sps;
struct v4l2_ctrl_h264_pps * p_h264_pps;
- struct v4l2_ctrl_h264_scaling_matrix __user * p_h264_scaling_matrix;
- struct v4l2_ctrl_h264_pred_weights __user * p_h264_pred_weights;
- struct v4l2_ctrl_h264_slice_params __user * p_h264_slice_params;
- struct v4l2_ctrl_h264_decode_params __user * p_h264_decode_params;
- struct v4l2_ctrl_fwht_params __user * p_fwht_params;
- struct v4l2_ctrl_vp8_frame __user * p_vp8_frame;
- struct v4l2_ctrl_mpeg2_sequence __user * p_mpeg2_sequence;
- struct v4l2_ctrl_mpeg2_picture __user * p_mpeg2_picture;
- struct v4l2_ctrl_mpeg2_quantisation __user * p_mpeg2_quantisation;
- struct v4l2_ctrl_vp9_compressed_hdr __user * p_vp9_compressed_hdr_probs;
- struct v4l2_ctrl_vp9_frame __user * p_vp9_frame;
- struct v4l2_ctrl_hevc_sps __user * p_hevc_sps;
- struct v4l2_ctrl_hevc_pps __user * p_hevc_pps;
- struct v4l2_ctrl_hevc_slice_params __user * p_hevc_slice_params;
- struct v4l2_ctrl_hevc_scaling_matrix __user * p_hevc_scaling_matrix;
- struct v4l2_ctrl_hevc_decode_params __user * p_hevc_decode_params;
- void __user * ptr;
+ struct v4l2_ctrl_h264_scaling_matrix * p_h264_scaling_matrix;
+ struct v4l2_ctrl_h264_pred_weights * p_h264_pred_weights;
+ struct v4l2_ctrl_h264_slice_params * p_h264_slice_params;
+ struct v4l2_ctrl_h264_decode_params * p_h264_decode_params;
+ struct v4l2_ctrl_fwht_params * p_fwht_params;
+ struct v4l2_ctrl_vp8_frame * p_vp8_frame;
+ struct v4l2_ctrl_mpeg2_sequence * p_mpeg2_sequence;
+ struct v4l2_ctrl_mpeg2_picture * p_mpeg2_picture;
+ struct v4l2_ctrl_mpeg2_quantisation * p_mpeg2_quantisation;
+ struct v4l2_ctrl_vp9_compressed_hdr * p_vp9_compressed_hdr_probs;
+ struct v4l2_ctrl_vp9_frame * p_vp9_frame;
+ struct v4l2_ctrl_hevc_sps * p_hevc_sps;
+ struct v4l2_ctrl_hevc_pps * p_hevc_pps;
+ struct v4l2_ctrl_hevc_slice_params * p_hevc_slice_params;
+ struct v4l2_ctrl_hevc_scaling_matrix * p_hevc_scaling_matrix;
+ struct v4l2_ctrl_hevc_decode_params * p_hevc_decode_params;
+ void * ptr;
};
} __attribute__((packed));
struct v4l2_ext_controls {