* [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes
@ 2017-03-20 11:37 Colin King
2017-03-20 12:16 ` Ido Schimmel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin King @ 2017-03-20 11:37 UTC (permalink / raw)
To: Jiri Pirko, Ido Schimmel, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The arguments packets and bytes to call mlxsw_sp_acl_rule_get_stats are
in the wrong order. Fix this by swapping them.
Detected by CoverityScan, CID#1419705 ("Arguments in wrong order")
Fixes: 7c1b8eb175b69add8ea ("mlxsw: spectrum: Add support for TC flower offload statistics")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
index e724c6266247..3e7a0bcbba72 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
@@ -375,7 +375,7 @@ int mlxsw_sp_flower_stats(struct mlxsw_sp_port *mlxsw_sp_port, bool ingress,
if (!rule)
return -EINVAL;
- err = mlxsw_sp_acl_rule_get_stats(mlxsw_sp, rule, &bytes, &packets,
+ err = mlxsw_sp_acl_rule_get_stats(mlxsw_sp, rule, &packets, &bytes,
&lastuse);
if (err)
goto err_rule_get_stats;
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes
2017-03-20 11:37 [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes Colin King
@ 2017-03-20 12:16 ` Ido Schimmel
2017-03-20 12:20 ` Jiri Pirko
2017-03-22 18:13 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2017-03-20 12:16 UTC (permalink / raw)
To: Colin King
Cc: Jiri Pirko, Ido Schimmel, netdev, kernel-janitors, linux-kernel
On Mon, Mar 20, 2017 at 11:37:22AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The arguments packets and bytes to call mlxsw_sp_acl_rule_get_stats are
> in the wrong order. Fix this by swapping them.
>
> Detected by CoverityScan, CID#1419705 ("Arguments in wrong order")
>
> Fixes: 7c1b8eb175b69add8ea ("mlxsw: spectrum: Add support for TC flower offload statistics")
Only need first 12 characters.
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Ido Schimmel <idosch@mellanox.com>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes
2017-03-20 11:37 [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes Colin King
2017-03-20 12:16 ` Ido Schimmel
@ 2017-03-20 12:20 ` Jiri Pirko
2017-03-22 18:13 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-03-20 12:20 UTC (permalink / raw)
To: Colin King
Cc: Jiri Pirko, Ido Schimmel, netdev, kernel-janitors, linux-kernel
Mon, Mar 20, 2017 at 12:37:22PM CET, colin.king@canonical.com wrote:
>From: Colin Ian King <colin.king@canonical.com>
>
>The arguments packets and bytes to call mlxsw_sp_acl_rule_get_stats are
>in the wrong order. Fix this by swapping them.
>
>Detected by CoverityScan, CID#1419705 ("Arguments in wrong order")
>
>Fixes: 7c1b8eb175b69add8ea ("mlxsw: spectrum: Add support for TC flower offload statistics")
>Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes
2017-03-20 11:37 [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes Colin King
2017-03-20 12:16 ` Ido Schimmel
2017-03-20 12:20 ` Jiri Pirko
@ 2017-03-22 18:13 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-22 18:13 UTC (permalink / raw)
To: colin.king; +Cc: jiri, idosch, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Mon, 20 Mar 2017 11:37:22 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> The arguments packets and bytes to call mlxsw_sp_acl_rule_get_stats are
> in the wrong order. Fix this by swapping them.
>
> Detected by CoverityScan, CID#1419705 ("Arguments in wrong order")
>
> Fixes: 7c1b8eb175b69add8ea ("mlxsw: spectrum: Add support for TC flower offload statistics")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-22 18:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 11:37 [PATCH] mlxsw: spectrum: fix swapped order of arguments packets and bytes Colin King
2017-03-20 12:16 ` Ido Schimmel
2017-03-20 12:20 ` Jiri Pirko
2017-03-22 18:13 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).