[media] mtk-vcodec: use designated initializers
authorKees Cook <keescook@chromium.org>
Sat, 17 Dec 2016 01:00:31 +0000 (23:00 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 09:42:56 +0000 (07:42 -0200)
Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c
drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c

index b76c80b..4eb3be3 100644 (file)
@@ -665,10 +665,10 @@ static int h264_enc_deinit(unsigned long handle)
 }
 
 static const struct venc_common_if venc_h264_if = {
-       h264_enc_init,
-       h264_enc_encode,
-       h264_enc_set_param,
-       h264_enc_deinit,
+       .init = h264_enc_init,
+       .encode = h264_enc_encode,
+       .set_param = h264_enc_set_param,
+       .deinit = h264_enc_deinit,
 };
 
 const struct venc_common_if *get_h264_enc_comm_if(void);
index 544f571..a6fa145 100644 (file)
@@ -470,10 +470,10 @@ static int vp8_enc_deinit(unsigned long handle)
 }
 
 static const struct venc_common_if venc_vp8_if = {
-       vp8_enc_init,
-       vp8_enc_encode,
-       vp8_enc_set_param,
-       vp8_enc_deinit,
+       .init = vp8_enc_init,
+       .encode = vp8_enc_encode,
+       .set_param = vp8_enc_set_param,
+       .deinit = vp8_enc_deinit,
 };
 
 const struct venc_common_if *get_vp8_enc_comm_if(void);