summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-03-22 20:14:47 +0200
committerDavid S. Miller <davem@davemloft.net>2018-03-23 12:59:26 -0400
commit885b0d4375a102d002bc654b4b68da46ba060032 (patch)
tree65ca9ce263add0543cf5a6a6b167a319cccea7d7
parent440ea4ae182820cfced77cee2b7f3e6eaa8ac5d3 (diff)
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 <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c4
1 files 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;