Thread (3 messages) 3 messages, 3 authors, 2022-01-28

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

From: Kalle Valo <kvalo@kernel.org>
Date: 2022-01-28 09:02:04
Also in: lkml, netdev

Possibly related (same subject, not in this thread)

cgel.zte@gmail.com writes:
From: Minghao Chi (CGEL ZTE) <redacted>

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 <redacted>
Signed-off-by: Minghao Chi (CGEL ZTE) <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help