From 885b0d4375a102d002bc654b4b68da46ba060032 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 22 Mar 2018 20:14:47 +0200 Subject: [PATCH] mlxsw: spectrum_span: Fix initialization of struct mlxsw_sp_span_parms Since the first element of struct mlxsw_sp_span_parms is a pointer, to zero-initialize this structure the correct notation is not = {0}, but rather = {NULL}, as reported by sparse. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c index ae22a3daffbf..ac24e52d74db 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c @@ -730,7 +730,7 @@ int mlxsw_sp_span_mirror_add(struct mlxsw_sp_port *from, { struct mlxsw_sp *mlxsw_sp = from->mlxsw_sp; const struct mlxsw_sp_span_entry_ops *ops; - struct mlxsw_sp_span_parms sparms = {0}; + struct mlxsw_sp_span_parms sparms = {NULL}; struct mlxsw_sp_span_entry *span_entry; int err; @@ -787,7 +787,7 @@ void mlxsw_sp_span_respin(struct mlxsw_sp *mlxsw_sp) ASSERT_RTNL(); for (i = 0; i < mlxsw_sp->span.entries_count; i++) { struct mlxsw_sp_span_entry *curr = &mlxsw_sp->span.entries[i]; - struct mlxsw_sp_span_parms sparms = {0}; + struct mlxsw_sp_span_parms sparms = {NULL}; if (!curr->ref_count) continue; -- 2.30.2