Skip to contentSkip to conversation

scsi: Replace zero-length array with flexible array member

PATCH Applied Thorsten Blum 2 participants 3 messages Nov 10, 2024 – Dec 10, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 scsi: Replace zero-length array with flexible array member

Replace the deprecated zero-length array with a modern flexible array member in the struct iscsi_bsg_host_vendor_reply.

---
Changes in v2:
- Use DECLARE_FLEX_ARRAY() as suggested by Gustavo A. R. Silva
- Link to v1: https://lore.kernel.org/r/[email protected]/

---
 include/scsi/scsi_bsg_iscsi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/scsi/scsi_bsg_iscsi.h +1 -1
index 9b1f0f424a79..a569c35b258d 100644
@@ -59,7 +59,7 @@ struct iscsi_bsg_host_vendor {
  */
 struct iscsi_bsg_host_vendor_reply {
 	/* start of vendor response area */
-	uint32_t vendor_rsp[0];
+	DECLARE_FLEX_ARRAY(uint32_t, vendor_rsp);
 };
 
 
Signature · 1 line
2.47.0
#1 lore raw

Thorsten,

Quoted 2 lines

Replace the deprecated zero-length array with a modern flexible array member in the struct iscsi_bsg_host_vendor_reply.

Applied to 6.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering