* [patch net-next] mlxsw: spectrum_dpipe: Fix sparse warnings
@ 2017-05-18 7:22 Jiri Pirko
2017-05-18 15:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2017-05-18 7:22 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, arkadis, mlxsw
From: Arkadi Sharshevsky <arkadis@mellanox.com>
drivers/net/ethernet/mellanox/mlxsw//spectrum_dpipe.c:221:52: warning:
Using plain integer as NULL pointer
drivers/net/ethernet/mellanox/mlxsw//spectrum_dpipe.c:221:74: warning:
Using plain integer as NULL pointer
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
index ce2534d..096212d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
@@ -217,7 +217,7 @@ static int
mlxsw_sp_table_erif_entries_dump(void *priv, bool counters_enabled,
struct devlink_dpipe_dump_ctx *dump_ctx)
{
- struct devlink_dpipe_value match_value = {{0}}, action_value = {{0}};
+ struct devlink_dpipe_value match_value, action_value;
struct devlink_dpipe_action action = {0};
struct devlink_dpipe_match match = {0};
struct devlink_dpipe_entry entry = {0};
@@ -226,6 +226,9 @@ mlxsw_sp_table_erif_entries_dump(void *priv, bool counters_enabled,
int i, j;
int err;
+ memset(&match_value, 0, sizeof(match_value));
+ memset(&action_value, 0, sizeof(action_value));
+
mlxsw_sp_erif_match_action_prepare(&match, &action);
err = mlxsw_sp_erif_entry_prepare(&entry, &match_value, &match,
&action_value, &action);
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch net-next] mlxsw: spectrum_dpipe: Fix sparse warnings
2017-05-18 7:22 [patch net-next] mlxsw: spectrum_dpipe: Fix sparse warnings Jiri Pirko
@ 2017-05-18 15:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-05-18 15:06 UTC (permalink / raw)
To: jiri; +Cc: netdev, idosch, arkadis, mlxsw
From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 18 May 2017 09:22:45 +0200
> From: Arkadi Sharshevsky <arkadis@mellanox.com>
>
> drivers/net/ethernet/mellanox/mlxsw//spectrum_dpipe.c:221:52: warning:
> Using plain integer as NULL pointer
> drivers/net/ethernet/mellanox/mlxsw//spectrum_dpipe.c:221:74: warning:
> Using plain integer as NULL pointer
>
> Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
> Reviewed-by: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-18 15:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 7:22 [patch net-next] mlxsw: spectrum_dpipe: Fix sparse warnings Jiri Pirko
2017-05-18 15:06 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox