[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241023221700.220063-2-mtodorovac69@gmail.com>
Date: Thu, 24 Oct 2024 00:17:01 +0200
From: Mirsad Todorovac <mtodorovac69@...il.com>
To: Mirsad Todorovac <mtodorovac69@...il.com>,
linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Nilesh Javali <njavali@...vell.com>,
GR-QLogic-Storage-Upstream@...vell.com,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Bart Van Assche <bvanassche@....org>
Subject: [PATCH v1 1/1] scsi: gla2xxx: use flexible array member at the end of structures
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@....org>
Cc: Nilesh Javali <njavali@...vell.com>
Cc: GR-QLogic-Storage-Upstream@...vell.com
Cc: "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: linux-scsi@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Mirsad Todorovac <mtodorovac69@...il.com>
---
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
Powered by blists - more mailing lists