scsi: bfa: Replace one-element array with flexible-array member
Subsystems (2)
PATCH 1/1 scsi: bfa: Replace one-element array with flexible-array member
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct fdmi_attr_s.
Important to mention is that doing a build before/after this patch results in no binary output differences.
This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1].
--- drivers/scsi/bfa/bfa_fc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/bfa/bfa_fc.h +1 -1
@@ -1548,7 +1548,7 @@ enum fdmi_port_attribute_type {struct fdmi_attr_s {__be16 type;__be16 len; -u8 value[1 ]; +u8 value[]; };/*
Signature · 1 line
2.34.1
Quoted 7 lines · Gustavo A. R. Silva
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
fdmi_attr_s.Important to mention is that doing a build before/after this patch results in no binary output differences.
Quoted 8 lines
This helps with the ongoing efforts to tighten the
FORTIFY_SOURCEroutines onmemcpy()and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1].
Signature · 1 line
Kees Cook
Martin K. Petersen
AppliedGustavo,
Quoted 3 lines
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
fdmi_attr_s.
Applied to 6.2/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · Gustavo A. R. Silva
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct
fdmi_attr_s.Important to mention is that doing a build before/after this patch results in no binary output differences.
[...]
Applied to 6.2/scsi-queue, thanks!
[1/1] scsi: bfa: Replace one-element array with flexible-array member
https://git.kernel.org/mkp/scsi/c/c4c5fa35563a
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering