Skip to contentSkip to conversation

scsi: megaraid_sas: struct MR_LD_VF_MAP: Replace 1-element arrays with flexible arrays

PATCH Applied Kees Cook 3 participants 4 messages Jul 11, 2024 – Aug 5, 2024

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 scsi: megaraid_sas: struct MR_LD_VF_MAP: Replace 1-element arrays with flexible arrays

Replace the deprecated[1] use of a 1-element array in struct MR_LD_VF_MAP with a modern flexible array.

No binary differences are present after this conversion.

---
Cc: Kashyap Desai <[email protected]>
Cc: Sumit Saxena <[email protected]>
Cc: Shivasharan S <[email protected]>
Cc: Chandrakanth patil <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/scsi/megaraid/megaraid_sas.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/megaraid/megaraid_sas.h +1 -1
index 5680c6cdb221..84cf77c48c0d 100644
@@ -2473,7 +2473,7 @@ struct MR_LD_VF_MAP {
 	union MR_LD_REF ref;
 	u8 ldVfCount;
 	u8 reserved[6];
-	u8 policy[1];
+	u8 policy[];
 };
 
 struct MR_LD_VF_AFFILIATION {
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Kees Cook

Replace the deprecated[1] use of a 1-element array in struct MR_LD_VF_MAP with a modern flexible array.

No binary differences are present after this conversion.

Thanks

Signature · 1 line
Gustavo
Quoted 26 lines

---
Cc: Kashyap Desai <[email protected]>
Cc: Sumit Saxena <[email protected]>
Cc: Shivasharan S <[email protected]>
Cc: Chandrakanth patil <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
  drivers/scsi/megaraid/megaraid_sas.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/megaraid/megaraid_sas.h +1 -1
index 5680c6cdb221..84cf77c48c0d 100644
@@ -2473,7 +2473,7 @@ struct MR_LD_VF_MAP {
  	union MR_LD_REF ref;
  	u8 ldVfCount;
  	u8 reserved[6];
-	u8 policy[1];
+	u8 policy[];
  };
 
  struct MR_LD_VF_AFFILIATION {
#2 lore raw
In reply to Kees Cook

Kees,

Quoted 2 lines

Replace the deprecated[1] use of a 1-element array in struct MR_LD_VF_MAP with a modern flexible array.

Applied to 6.12/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#3 lore raw
In reply to Kees Cook
Quoted 6 lines · Kees Cook

Replace the deprecated[1] use of a 1-element array in struct MR_LD_VF_MAP with a modern flexible array.

No binary differences are present after this conversion.

Applied to 6.12/scsi-queue, thanks!

[1/1] scsi: megaraid_sas: struct MR_LD_VF_MAP: Replace 1-element arrays with flexible arrays

      https://git.kernel.org/mkp/scsi/c/ed8ab02c85b3
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering