Commit 1f112660 authored by James Seo's avatar James Seo Committed by Martin K. Petersen
Browse files

scsi: mpt3sas: Make MPI26_CONFIG_PAGE_PIOUNIT_1::PhyData[] a flexible array



This terminal 1-length variable array can be directly converted into a C99
flexible array member.

As all users of MPI26_CONFIG_PAGE_PIOUNIT_1 (Mpi26PCIeIOUnitPage1_t) do not
use PhyData[], no further source changes are required to accommodate its
reduced sizeof():

 - mpt3sas_config.c:mpt3sas_config_get_pcie_iounit_pg1() fetches a
   Mpi26PCIeIOUnitPage1_t into a caller-provided buffer, and may fetch
   and write PhyData[] into that buffer depending on its sz argument.
   It has one caller:

   - mpt3sas_base.c:_base_assign_fw_reported_qd() passes
     sizeof(Mpi26PCIeIOUnitPage1_t) as sz, but does not use PhyData[].

Signed-off-by: default avatarJames Seo <james@equiv.tech>
Link: https://lore.kernel.org/r/20230806170604.16143-7-james@equiv.tech


Tested-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e249a957
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment