Replace zero-length array with flexible-array member and make use of the struct_size() helper in kmalloc(). For example: struct wcn36xx_hal_ind_msg { struct list_head list; size_t msg_len; u8 msg[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220208015606.1514022-1-chi.minghao@zte.com.cn |
||
---|---|---|
.. | ||
debug.c | ||
debug.h | ||
dxe.c | ||
dxe.h | ||
hal.h | ||
Kconfig | ||
main.c | ||
Makefile | ||
pmc.c | ||
pmc.h | ||
smd.c | ||
smd.h | ||
testmode_i.h | ||
testmode.c | ||
testmode.h | ||
txrx.c | ||
txrx.h | ||
wcn36xx.h |