In two places time32 structures were defined, but they are not used if CONFIG_COMPAT_32BIT_TIME is not set. Put these two structs under #ifdef CONFIG_COMPAT_32BIT_TIME as well to clearly indicate that they are only used if that config option is set. Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> --- diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c index 58d29284db13..a8556c02cd50 100644 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c @@ -304,6 +304,7 @@ struct v4l2_buffer32 { __s32 request_fd; }; +#ifdef CONFIG_COMPAT_32BIT_TIME struct v4l2_buffer32_time32 { __u32 index; __u32 type; /* enum v4l2_buf_type */ @@ -326,6 +327,7 @@ struct v4l2_buffer32_time32 { __u32 reserved2; __s32 request_fd; }; +#endif static int get_v4l2_plane32(struct v4l2_plane *p64, struct v4l2_plane32 __user *p32, @@ -763,6 +765,7 @@ struct v4l2_event32 { __u32 reserved[8]; }; +#ifdef CONFIG_COMPAT_32BIT_TIME struct v4l2_event32_time32 { __u32 type; union { @@ -775,6 +778,7 @@ struct v4l2_event32_time32 { __u32 id; __u32 reserved[8]; }; +#endif static int put_v4l2_event32(struct v4l2_event *p64, struct v4l2_event32 __user *p32)