提交 4780dbdb 编写于 作者: I Ido Schimmel 提交者: David S. Miller

mlxsw: spectrum_span: Replace zero-length array with flexible-array member

In a similar fashion to commit e99f8e7f ("mlxsw: Replace zero-length
array with flexible-array member"), use a flexible-array member to get a
compiler warning in case the flexible array does not occur last in the
structure.
Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
Reviewed-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4c00dafc
......@@ -22,7 +22,7 @@ struct mlxsw_sp_span {
struct mlxsw_sp *mlxsw_sp;
atomic_t active_entries_count;
int entries_count;
struct mlxsw_sp_span_entry entries[0];
struct mlxsw_sp_span_entry entries[];
};
static void mlxsw_sp_span_respin_work(struct work_struct *work);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册