scsi: mpt3sas: Replace dynamic allocations with local variables
authorJames Seo <james@equiv.tech>
Sun, 6 Aug 2023 17:06:04 +0000 (10:06 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 15 Nov 2023 13:52:03 +0000 (08:52 -0500)
commite188215562727972cb49681b6ea56936455cf66e
treec18e6646d1383fa9d3e70c1b74eeb56da1f140bb
parentdde41e0c1cc2f81bfb5e4fc86ad66c2234c1878c
scsi: mpt3sas: Replace dynamic allocations with local variables

mpt3sas_scsih.c:_scsih_scan_for_devices_after_reset() allocates and fetches
a MPI2_CONFIG_PAGE_RAID_VOL_0 struct (Mpi2RaidVolPage0_t) and a
MPI2_CONFIG_PAGE_RAID_VOL_1 struct (Mpi2RaidVolPage1_t), but does not
include the terminal flexible array members in the struct size
calculations, fetch those members, or otherwise use those members in any
way.

These dynamic allocations can be replaced with local variables.

Signed-off-by: James Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230806170604.16143-13-james@equiv.tech
Tested-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_scsih.c