Commit 0fc6d4e4 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: use flexible-array member instead of zero-length array

Use flexible-array member introduced in C99 instead of zero-length
array. Most of zero-length array was already taken care in previous
patch [1]. Now modified few more cases which were not handled earlier.

[1]. https://patchwork.kernel.org/patch/11394197/Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20200302162226.4196-4-ajay.kathat@microchip.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f79a8a85
...@@ -109,27 +109,27 @@ struct wilc_spi_cmd { ...@@ -109,27 +109,27 @@ struct wilc_spi_cmd {
union { union {
struct { struct {
u8 addr[3]; u8 addr[3];
u8 crc[0]; u8 crc[];
} __packed simple_cmd; } __packed simple_cmd;
struct { struct {
u8 addr[3]; u8 addr[3];
u8 size[2]; u8 size[2];
u8 crc[0]; u8 crc[];
} __packed dma_cmd; } __packed dma_cmd;
struct { struct {
u8 addr[3]; u8 addr[3];
u8 size[3]; u8 size[3];
u8 crc[0]; u8 crc[];
} __packed dma_cmd_ext; } __packed dma_cmd_ext;
struct { struct {
u8 addr[2]; u8 addr[2];
__be32 data; __be32 data;
u8 crc[0]; u8 crc[];
} __packed internal_w_cmd; } __packed internal_w_cmd;
struct { struct {
u8 addr[3]; u8 addr[3];
__be32 data; __be32 data;
u8 crc[0]; u8 crc[];
} __packed w_cmd; } __packed w_cmd;
} u; } u;
} __packed; } __packed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment