Commit 4780dbdb authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller
Browse files

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: default avatarIdo Schimmel <idosch@mellanox.com>
Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c00dafc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);