Skip to content
Commit 41e83026 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Martin K. Petersen
Browse files

scsi: megaraid_sas: Use struct_size() in code related to struct MR_FW_RAID_MAP

Prefer struct_size() over open-coded versions of idiom:

	sizeof(struct-with-flex-array) + sizeof(type-of-flex-array) * count

where count is the max number of items the flexible array is supposed to
have.

Link: https://github.com/KSPP/linux/issues/160
Link: https://lore.kernel.org/r/1211398fb8f7ab332a93f4f8f1a63e8168dbd002.1660592640.git.gustavoars@kernel.org


Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ee92366a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment