From: Gustavo A. R. Silva Date: Thu, 28 May 2020 14:35:11 +0000 (-0500) Subject: soc: ti: Replace zero-length array with flexible-array X-Git-Tag: v5.8-rc2~29^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9f162d9d726526b243b7452a6e7bb0ae5148c0f1;p=users%2Fhch%2Fblock.git soc: ti: Replace zero-length array with flexible-array There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://github.com/KSPP/linux/issues/21 Signed-off-by: Gustavo A. R. Silva --- diff --git a/drivers/soc/ti/knav_qmss.h b/drivers/soc/ti/knav_qmss.h index 038aec352df7..a01eda720bf6 100644 --- a/drivers/soc/ti/knav_qmss.h +++ b/drivers/soc/ti/knav_qmss.h @@ -67,7 +67,7 @@ struct knav_reg_config { u32 link_ram_size0; u32 link_ram_base1; u32 __pad2[2]; - u32 starvation[0]; + u32 starvation[]; }; struct knav_reg_region {