diff options
author | Kees Cook <[email protected]> | 2024-07-11 08:56:35 -0700 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2024-08-02 21:22:41 -0400 |
commit | 41bb96296f9d3a92f3b52bcf502d6c0e86fa84a0 (patch) | |
tree | 4c864e4038a5d23ee4ac6ff3896e77172a40a62a | |
parent | 0e11f97bfddc608fd31d4fb7b8feaf74755d6372 (diff) |
scsi: mpi3mr: struct mpi3_sas_io_unit_page0: Replace 1-element array with flexible array
Replace the deprecated[1] use of a 1-element array in struct
mpi3_sas_io_unit_page0 with a modern flexible array.
No binary differences are present after this conversion.
Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h b/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h index 6a19e17eb1a7..66cca35d8e52 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h @@ -1565,16 +1565,13 @@ struct mpi3_sas_io_unit0_phy_data { __le32 reserved10; }; -#ifndef MPI3_SAS_IO_UNIT0_PHY_MAX -#define MPI3_SAS_IO_UNIT0_PHY_MAX (1) -#endif struct mpi3_sas_io_unit_page0 { struct mpi3_config_page_header header; __le32 reserved08; u8 num_phys; u8 init_status; __le16 reserved0e; - struct mpi3_sas_io_unit0_phy_data phy_data[MPI3_SAS_IO_UNIT0_PHY_MAX]; + struct mpi3_sas_io_unit0_phy_data phy_data[]; }; #define MPI3_SASIOUNIT0_PAGEVERSION (0x00) |