Skip to content

Commit c72e13c

Browse files
keesmartinkpetersen
authored andcommitted
scsi: ipr: Replace 1-element arrays with flexible arrays
Replace the deprecated[1] use of a 1-element arrays in struct ipr_hostrcb_fabric_desc and struct ipr_hostrcb64_fabric_desc with modern flexible arrays. 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/20240711180702.work.536-kees@kernel.org Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 2e35b43 commit c72e13c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/scsi/ipr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ struct ipr_hostrcb_fabric_desc {
10301030
#define IPR_PATH_FAILED 0x03
10311031

10321032
__be16 num_entries;
1033-
struct ipr_hostrcb_config_element elem[1];
1033+
struct ipr_hostrcb_config_element elem[];
10341034
}__attribute__((packed, aligned (4)));
10351035

10361036
struct ipr_hostrcb64_fabric_desc {
@@ -1044,7 +1044,7 @@ struct ipr_hostrcb64_fabric_desc {
10441044
u8 res_path[8];
10451045
u8 reserved3[6];
10461046
__be16 num_entries;
1047-
struct ipr_hostrcb64_config_element elem[1];
1047+
struct ipr_hostrcb64_config_element elem[];
10481048
}__attribute__((packed, aligned (8)));
10491049

10501050
#define for_each_hrrq(hrrq, ioa_cfg) \

0 commit comments

Comments
 (0)