diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2020-03-02 16:22:36 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-04 07:55:02 +0100 |
commit | 0fc6d4e4ce010eb077c6db9ec1e18d999c69e3c3 (patch) | |
tree | ddfe8ed7b48a5f60bbd12c5f33690cf516922097 /drivers/staging/wilc1000 | |
parent | f79a8a85cc5294733724f48cfc1fc167622e513b (diff) | |
download | lwn-0fc6d4e4ce010eb077c6db9ec1e18d999c69e3c3.tar.gz lwn-0fc6d4e4ce010eb077c6db9ec1e18d999c69e3c3.zip |
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: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20200302162226.4196-4-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r-- | drivers/staging/wilc1000/spi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/wilc1000/spi.c b/drivers/staging/wilc1000/spi.c index 11653ac118cd..dfd25df75780 100644 --- a/drivers/staging/wilc1000/spi.c +++ b/drivers/staging/wilc1000/spi.c @@ -109,27 +109,27 @@ struct wilc_spi_cmd { union { struct { u8 addr[3]; - u8 crc[0]; + u8 crc[]; } __packed simple_cmd; struct { u8 addr[3]; u8 size[2]; - u8 crc[0]; + u8 crc[]; } __packed dma_cmd; struct { u8 addr[3]; u8 size[3]; - u8 crc[0]; + u8 crc[]; } __packed dma_cmd_ext; struct { u8 addr[2]; __be32 data; - u8 crc[0]; + u8 crc[]; } __packed internal_w_cmd; struct { u8 addr[3]; __be32 data; - u8 crc[0]; + u8 crc[]; } __packed w_cmd; } u; } __packed; |