Coccinelle advised modern C99-style flexible arrays instead of array[1] as the closing member of the struct: ./drivers/scsi/qla2xxx/qla_dbg.h:34:8-16: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) ./drivers/scsi/qla2xxx/qla_dbg.h:87:8-15: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) ./drivers/scsi/qla2xxx/qla_dbg.h:126:8-15: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) ./drivers/scsi/qla2xxx/qla_dbg.h:165:8-15: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) ./drivers/scsi/qla2xxx/qla_dbg.h:213:8-15: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) Fixes: 21038b0900d1b ("scsi: qla2xxx: Fix endianness annotations in header files") Cc: Bart Van Assche <bvanassche@xxxxxxx> Cc: Nilesh Javali <njavali@xxxxxxxxxxx> Cc: GR-QLogic-Storage-Upstream@xxxxxxxxxxx Cc: "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx> Cc: linux-scsi@xxxxxxxxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx Signed-off-by: Mirsad Todorovac <mtodorovac69@xxxxxxxxx> --- v1: initial patch to conform to C99 standard. drivers/scsi/qla2xxx/qla_dbg.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h index 54f0a412226f..ca9304df484b 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.h +++ b/drivers/scsi/qla2xxx/qla_dbg.h @@ -31,7 +31,7 @@ struct qla2300_fw_dump { __be16 fpm_b1_reg[64]; __be16 risc_ram[0xf800]; __be16 stack_ram[0x1000]; - __be16 data_ram[1]; + __be16 data_ram[]; }; struct qla2100_fw_dump { @@ -84,7 +84,7 @@ struct qla24xx_fw_dump { __be32 fpm_hdw_reg[192]; __be32 fb_hdw_reg[176]; __be32 code_ram[0x2000]; - __be32 ext_mem[1]; + __be32 ext_mem[]; }; struct qla25xx_fw_dump { @@ -123,7 +123,7 @@ struct qla25xx_fw_dump { __be32 fpm_hdw_reg[192]; __be32 fb_hdw_reg[192]; __be32 code_ram[0x2000]; - __be32 ext_mem[1]; + __be32 ext_mem[]; }; struct qla81xx_fw_dump { @@ -162,7 +162,7 @@ struct qla81xx_fw_dump { __be32 fpm_hdw_reg[224]; __be32 fb_hdw_reg[208]; __be32 code_ram[0x2000]; - __be32 ext_mem[1]; + __be32 ext_mem[]; }; struct qla83xx_fw_dump { @@ -210,7 +210,7 @@ struct qla83xx_fw_dump { __be32 fb_hdw_reg[432]; __be32 at0_array_reg[128]; __be32 code_ram[0x2400]; - __be32 ext_mem[1]; + __be32 ext_mem[]; }; #define EFT_NUM_BUFFERS 4 -- 2.43.0