Search Linux Wireless

Re: [PATCH V2] wcn36xx: use struct_size over open coded arithmetic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cgel.zte@xxxxxxxxx wrote:

> 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 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@xxxxxxxxxx>
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@xxxxxxxxxx>

What are the changes from v1?

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220208015606.1514022-1-chi.minghao@xxxxxxxxxx/

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux