scsi: ipr: Replace 1-element arrays with flexible arrays
Subsystems (2)
PATCH 1/1 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.
---
Cc: Brian King <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
--- drivers/scsi/ipr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ipr.h +2 -2
@@ -1030,7 +1030,7 @@ struct ipr_hostrcb_fabric_desc {#define IPR_PATH_FAILED 0x03__be16 num_entries; -struct ipr_hostrcb_config_element elem[1 ]; +struct ipr_hostrcb_config_element elem[]; }__attribute__((packed, aligned (4)));struct ipr_hostrcb64_fabric_desc {
@@ -1044,7 +1044,7 @@ struct ipr_hostrcb64_fabric_desc {u8 res_path[8 ];u8 reserved3[6 ];__be16 num_entries; -struct ipr_hostrcb64_config_element elem[1 ]; +struct ipr_hostrcb64_config_element elem[]; }__attribute__((packed, aligned (8)));#define for_each_hrrq (hrrq, ioa_cfg) \
Signature · 1 line
2.34.1
Quoted 8 lines · Kees Cook
Replace the deprecated[1] use of a 1-element arrays in struct
ipr_hostrcb_fabric_descand structipr_hostrcb64_fabric_descwith modern flexible arrays.No binary differences are present after this conversion.
Signed-off-by Kees Cook <[email protected]>
Thanks
Signature · 1 line
Gustavo
Quoted 31 lines
---
Cc: Brian King <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]--- drivers/scsi/ipr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/ipr.h +2
-2@@ -1030,7 +1030,7 @@ struct ipr_hostrcb_fabric_desc {#define IPR_PATH_FAILED 0x03__be16 num_entries; -struct ipr_hostrcb_config_element elem[1 ]; +struct ipr_hostrcb_config_element elem[]; }__attribute__((packed, aligned (4)));struct ipr_hostrcb64_fabric_desc {@@ -1044,7 +1044,7 @@ struct ipr_hostrcb64_fabric_desc {u8 res_path[8 ];u8 reserved3[6 ];__be16 num_entries; -struct ipr_hostrcb64_config_element elem[1 ]; +struct ipr_hostrcb64_config_element elem[]; }__attribute__((packed, aligned (8)));#define for_each_hrrq (hrrq, ioa_cfg) \
Martin K. Petersen
AppliedKees,
Quoted 3 lines
Replace the deprecated[1] use of a 1-element arrays in struct
ipr_hostrcb_fabric_descand structipr_hostrcb64_fabric_descwith modern flexible arrays.
Applied to 6.12/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · Kees Cook
Replace the deprecated[1] use of a 1-element arrays in struct
ipr_hostrcb_fabric_descand structipr_hostrcb64_fabric_descwith modern flexible arrays.No binary differences are present after this conversion.
[...]
Applied to 6.12/scsi-queue, thanks!
[1/1] scsi: ipr: Replace 1-element arrays with flexible arrays
https://git.kernel.org/mkp/scsi/c/c72e13cf820b
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering