Message ID | 20241110151749.3311-2-thorsten.blum@linux.dev |
---|---|
State | New |
Headers | show |
Series | scsi: Replace zero-length array with flexible array member | expand |
> In file included from drivers/scsi/scsi_transport_iscsi.c:23: >>> include/scsi/scsi_bsg_iscsi.h:62:18: error: flexible array member in a struct with no named members > 62 | uint32_t vendor_rsp[]; > | ^~~~~~~~~~ This won't be an issue in the near future, but for now just use DECLARE_FLEX_ARRAY(). Thanks -- Gustavo
diff --git a/include/scsi/scsi_bsg_iscsi.h b/include/scsi/scsi_bsg_iscsi.h index 9b1f0f424a79..df8083f12119 100644 --- a/include/scsi/scsi_bsg_iscsi.h +++ b/include/scsi/scsi_bsg_iscsi.h @@ -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]; + uint32_t vendor_rsp[]; };
Replace the deprecated zero-length array with a modern flexible array member in the struct iscsi_bsg_host_vendor_reply. Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> --- include/scsi/scsi_bsg_iscsi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)