diff mbox series

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

Message ID 20240711155823.work.778-kees@kernel.org (mailing list archive)
State Mainlined
Commit ed8ab02c85b3494ec81f35f12e01f6678af09f6a
Headers show
Series scsi: megaraid_sas: struct MR_LD_VF_MAP: Replace 1-element arrays with flexible arrays | expand

Commit Message

Kees Cook July 11, 2024, 3:58 p.m. UTC
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 [1]
Signed-off-by: Kees Cook <kees@kernel.org>
---
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: Chandrakanth patil <chandrakanth.patil@broadcom.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: megaraidlinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
---
 drivers/scsi/megaraid/megaraid_sas.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gustavo A. R. Silva July 11, 2024, 4:27 p.m. UTC | #1
On 11/07/24 09:58, Kees Cook wrote:
> 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 [1]
> Signed-off-by: Kees Cook <kees@kernel.org>

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Thanks
Martin K. Petersen Aug. 3, 2024, 1:26 a.m. UTC | #2
Kees,

> 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!
Martin K. Petersen Aug. 5, 2024, 9:17 p.m. UTC | #3
On Thu, 11 Jul 2024 08:58:23 -0700, Kees Cook wrote:

> 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
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 5680c6cdb221..84cf77c48c0d 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -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 {