Skip to content

Commit 41bb962

Browse files
keesmartinkpetersen
authored andcommitted
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: KSPP#79 [1] Signed-off-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20240711155637.3757036-3-kees@kernel.org Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 0e11f97 commit 41bb962

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
@@ -1565,16 +1565,13 @@ struct mpi3_sas_io_unit0_phy_data {
15651565
__le32 reserved10;
15661566
};
15671567

1568-
#ifndef MPI3_SAS_IO_UNIT0_PHY_MAX
1569-
#define MPI3_SAS_IO_UNIT0_PHY_MAX (1)
1570-
#endif
15711568
struct mpi3_sas_io_unit_page0 {
15721569
struct mpi3_config_page_header header;
15731570
__le32 reserved08;
15741571
u8 num_phys;
15751572
u8 init_status;
15761573
__le16 reserved0e;
1577-
struct mpi3_sas_io_unit0_phy_data phy_data[MPI3_SAS_IO_UNIT0_PHY_MAX];
1574+
struct mpi3_sas_io_unit0_phy_data phy_data[];
15781575
};
15791576

15801577
#define MPI3_SASIOUNIT0_PAGEVERSION (0x00)

0 commit comments

Comments
 (0)