diff mbox series

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

Message ID 20210323131137.45552-1-zou_wei@huawei.com (mailing list archive)
State New
Headers show
Series [-next] mtd: rawnand: rockchip: Use flexible-array member instead of zero-length array | expand

Commit Message

Zou Wei March 23, 2021, 1:11 p.m. UTC
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@huawei.com>
---
 drivers/mtd/nand/raw/rockchip-nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miquel Raynal March 28, 2021, 5:14 p.m. UTC | #1
On Tue, 2021-03-23 at 13:11:37 UTC, Zou Wei wrote:
> 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@huawei.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel
diff mbox series

Patch

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. */
 };