diff options
author | 2022-08-15 16:51:36 -0500 | |
---|---|---|
committer | 2022-08-31 23:39:59 -0400 | |
commit | 41e830269d68a07b3e9214449b9ff0be7a3cfda5 (patch) | |
tree | 82732fd081b7b9e34ac075e999918b9a5a9625c1 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | scsi: megaraid_sas: Replace one-element array with flexible-array member in MR_PD_CFG_SEQ_NUM_SYNC (diff) | |
download | linux-dev-41e830269d68a07b3e9214449b9ff0be7a3cfda5.tar.xz linux-dev-41e830269d68a07b3e9214449b9ff0be7a3cfda5.zip |
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: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions