]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: megaraid_sas: struct MR_LD_VF_MAP: Replace 1-element arrays with flexible arrays
authorKees Cook <kees@kernel.org>
Thu, 11 Jul 2024 15:58:23 +0000 (08:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 3 Aug 2024 01:26:01 +0000 (21:26 -0400)
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.

Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20240711155823.work.778-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas.h

index 5680c6cdb22193feaff2851e36d47b2c03f26408..84cf77c48c0d26af0fd62d2634dcee177bcd47ac 100644 (file)
@@ -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 {