diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2022-08-15 16:52:33 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-08-31 23:39:59 -0400 |
commit | 48658213202c4f48ef34b43b9b6f60af8b67fb8a (patch) | |
tree | 0ce0c454452ab6ff10e866526cd1c732537a1e6d /drivers/scsi/mpt3sas | |
parent | 41e830269d68a07b3e9214449b9ff0be7a3cfda5 (diff) | |
download | linux-48658213202c4f48ef34b43b9b6f60af8b67fb8a.tar.gz linux-48658213202c4f48ef34b43b9b6f60af8b67fb8a.tar.bz2 linux-48658213202c4f48ef34b43b9b6f60af8b67fb8a.zip |
scsi: megaraid_sas: Use struct_size() in code related to struct MR_PD_CFG_SEQ_NUM_SYNC
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/b215f4760f0e8fbe5fc35be20f2487e89924424d.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 'drivers/scsi/mpt3sas')
0 files changed, 0 insertions, 0 deletions