diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2021-09-29 14:36:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-05 12:28:48 +0200 |
commit | c08976563d6f20e5e8295a992c4b4e0e6e839053 (patch) | |
tree | 5900f064db46cd4b860586d6d465bb9876c9ea2f /drivers/staging/r8188eu/include/osdep_service.h | |
parent | 403aa62da3efd1828f783c2453067bf239c16d1c (diff) | |
download | linux-c08976563d6f20e5e8295a992c4b4e0e6e839053.tar.bz2 |
staging: r8188eu: Replace zero-length array with flexible-array member
One-element and zero-length arrays are deprecated and should be
replaced with flexible-array members[1].
Replace zero-length array with flexible-array member and make use
of the struct_size() helper in kmalloc().
[1] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/78
Link: https://github.com/KSPP/linux/issues/160
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20210929193658.GA339070@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu/include/osdep_service.h')
-rw-r--r-- | drivers/staging/r8188eu/include/osdep_service.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h index da85a9681c4a..4622ce400e41 100644 --- a/drivers/staging/r8188eu/include/osdep_service.h +++ b/drivers/staging/r8188eu/include/osdep_service.h @@ -289,7 +289,7 @@ struct rtw_cbuf { u32 write; u32 read; u32 size; - void *bufs[0]; + void *bufs[]; }; bool rtw_cbuf_empty(struct rtw_cbuf *cbuf); |