Re: [PATCH] dvm: use struct_size over open coded arithmetic

From: Kalle Valo
Date: Fri Jan 28 2022 - 04:02:06 EST


cgel.zte@xxxxxxxxx writes:

> From: Minghao Chi (CGEL ZTE) <chi.minghao@xxxxxxxxxx>
>
> Replace zero-length array with flexible-array member and make use
> of the struct_size() helper in kmalloc(). For example:
>
> struct iwl_wipan_noa_data {
> ...
> u8 data[];
> };
>
> 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@xxxxxxxxxx>
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@xxxxxxxxxx>
> ---
> drivers/net/wireless/intel/iwlwifi/dvm/rx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

The prefix should be "iwlwifi: dvm:".

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches