Skip to content

Commit a62193a

Browse files
keesmartinkpetersen
authored andcommitted
scsi: mpi3mr: struct mpi3_sas_io_unit_page1: Replace 1-element array with flexible array
Replace the deprecated[1] use of a 1-element array in struct mpi3_sas_io_unit_page1 with a modern flexible array. No binary differences are present after this conversion. Link: KSPP#79 [1] Signed-off-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20240711155637.3757036-4-kees@kernel.org Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 41bb962 commit a62193a

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,9 +1603,6 @@ struct mpi3_sas_io_unit1_phy_data {
16031603
__le32 reserved08;
16041604
};
16051605

1606-
#ifndef MPI3_SAS_IO_UNIT1_PHY_MAX
1607-
#define MPI3_SAS_IO_UNIT1_PHY_MAX (1)
1608-
#endif
16091606
struct mpi3_sas_io_unit_page1 {
16101607
struct mpi3_config_page_header header;
16111608
__le16 control_flags;
@@ -1615,7 +1612,7 @@ struct mpi3_sas_io_unit_page1 {
16151612
u8 num_phys;
16161613
u8 sata_max_q_depth;
16171614
__le16 reserved12;
1618-
struct mpi3_sas_io_unit1_phy_data phy_data[MPI3_SAS_IO_UNIT1_PHY_MAX];
1615+
struct mpi3_sas_io_unit1_phy_data phy_data[];
16191616
};
16201617

16211618
#define MPI3_SASIOUNIT1_PAGEVERSION (0x00)

0 commit comments

Comments
 (0)