[PATCH -next] mtd: rawnand: rockchip: Use flexible-array member instead of zero-length array

Zou Wei zou_wei at huawei.com
Tue Mar 23 13:11:37 GMT 2021


Suppresses the following coccinelle warning:

drivers/mtd/nand/raw/rockchip-nand-controller.c:162:4-8: WARNING use flexible-array member instead

Signed-off-by: Zou Wei <zou_wei at huawei.com>
---
 drivers/mtd/nand/raw/rockchip-nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/raw/rockchip-nand-controller.c b/drivers/mtd/nand/raw/rockchip-nand-controller.c
index 796b678cb108..b5405bc7ca3a 100644
--- a/drivers/mtd/nand/raw/rockchip-nand-controller.c
+++ b/drivers/mtd/nand/raw/rockchip-nand-controller.c
@@ -159,7 +159,7 @@ struct rk_nfc_nand_chip {
 	u32 timing;
 
 	u8 nsels;
-	u8 sels[0];
+	u8 sels[];
 	/* Nothing after this field. */
 };
 
-- 
2.17.1




More information about the Linux-rockchip mailing list