mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
media: dvb-frontend/mxl5xx: Refactor struct MBIN_FILE_T and MBIN_SEGMENT_T
Replace the older style one-element array with a flexible array member. There does not seem to be any allocation for these structs in the code, so no more code changes are required. The following cocci warnings are fixed: drivers/media/dvb-frontends/mxl5xx_defs.h:182:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/media/dvb-frontends/mxl5xx_defs.h:171:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
abb7a73b68
commit
461d6ee65d
@ -168,7 +168,7 @@ struct MBIN_FILE_HEADER_T {
|
||||
|
||||
struct MBIN_FILE_T {
|
||||
struct MBIN_FILE_HEADER_T header;
|
||||
u8 data[1];
|
||||
u8 data[];
|
||||
};
|
||||
|
||||
struct MBIN_SEGMENT_HEADER_T {
|
||||
@ -179,7 +179,7 @@ struct MBIN_SEGMENT_HEADER_T {
|
||||
|
||||
struct MBIN_SEGMENT_T {
|
||||
struct MBIN_SEGMENT_HEADER_T header;
|
||||
u8 data[1];
|
||||
u8 data[];
|
||||
};
|
||||
|
||||
enum MXL_CMD_TYPE_E { MXL_CMD_WRITE = 0, MXL_CMD_READ };
|
||||
|
Loading…
Reference in New Issue
Block a user