]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ath10k: wmi: Use struct_size() helper in ath10k_wmi_alloc_skb()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 16 Jun 2020 22:51:32 +0000 (17:51 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 31 Aug 2020 15:19:55 +0000 (18:19 +0300)
commite96eecdb290af89e3aca05df835d6123c8947bee
tree18d0d20cafad8f777d2030e8125b8f40695fa2f9
parent859228a3ae82e587843e16f4e3bae27f94ac1978
ath10k: wmi: Use struct_size() helper in ath10k_wmi_alloc_skb()

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes. Also, remove unnecessary
variable _len_.

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200616225132.GA19873@embeddedor
drivers/net/wireless/ath/ath10k/wmi.c