* [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types
@ 2019-07-30 11:47 Colin King
2019-07-30 12:19 ` Petr Machata
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin King @ 2019-07-30 11:47 UTC (permalink / raw)
To: Petr Machata, Jiri Pirko, Ido Schimmel, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently are duplicated checks on orig_egr_types which are
redundant, I believe this is a typo and should actually be
orig_ing_types || orig_egr_types instead of the expression
orig_egr_types || orig_egr_types. Fix these.
Addresses-Coverity: ("Same on both sides")
Fixes: c6b36bdd04b5 ("mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
index 98c5ba3200bc..63b07edd9d81 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
@@ -999,14 +999,14 @@ static int mlxsw_sp1_ptp_mtpppc_update(struct mlxsw_sp_port *mlxsw_sp_port,
}
}
- if ((ing_types || egr_types) && !(orig_egr_types || orig_egr_types)) {
+ if ((ing_types || egr_types) && !(orig_ing_types || orig_egr_types)) {
err = mlxsw_sp_nve_inc_parsing_depth_get(mlxsw_sp);
if (err) {
netdev_err(mlxsw_sp_port->dev, "Failed to increase parsing depth");
return err;
}
}
- if (!(ing_types || egr_types) && (orig_egr_types || orig_egr_types))
+ if (!(ing_types || egr_types) && (orig_ing_types || orig_egr_types))
mlxsw_sp_nve_inc_parsing_depth_put(mlxsw_sp);
return mlxsw_sp1_ptp_mtpppc_set(mlxsw_sp_port->mlxsw_sp,
--
V2: fix both occurances of this typo. Thanks to Petr Machata for spotting
the 2nd occurrance
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types
2019-07-30 11:47 [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types Colin King
@ 2019-07-30 12:19 ` Petr Machata
2019-07-30 12:22 ` Colin Ian King
2019-07-30 17:20 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Petr Machata @ 2019-07-30 12:19 UTC (permalink / raw)
To: Colin King
Cc: Jiri Pirko, Ido Schimmel, David S . Miller, netdev,
kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> writes:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently are duplicated checks on orig_egr_types which are
> redundant, I believe this is a typo and should actually be
> orig_ing_types || orig_egr_types instead of the expression
> orig_egr_types || orig_egr_types. Fix these.
>
> Addresses-Coverity: ("Same on both sides")
> Fixes: c6b36bdd04b5 ("mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thank you, it looks good. But can you please direct this to "net", not
"net-next"?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types
2019-07-30 11:47 [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types Colin King
2019-07-30 12:19 ` Petr Machata
@ 2019-07-30 12:22 ` Colin Ian King
2019-07-30 17:20 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Colin Ian King @ 2019-07-30 12:22 UTC (permalink / raw)
To: Petr Machata, Jiri Pirko, Ido Schimmel, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
As pointed out by Petr, this should be [net] and not [net-next]
On 30/07/2019 12:47, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently are duplicated checks on orig_egr_types which are
> redundant, I believe this is a typo and should actually be
> orig_ing_types || orig_egr_types instead of the expression
> orig_egr_types || orig_egr_types. Fix these.
>
> Addresses-Coverity: ("Same on both sides")
> Fixes: c6b36bdd04b5 ("mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
> index 98c5ba3200bc..63b07edd9d81 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
> @@ -999,14 +999,14 @@ static int mlxsw_sp1_ptp_mtpppc_update(struct mlxsw_sp_port *mlxsw_sp_port,
> }
> }
>
> - if ((ing_types || egr_types) && !(orig_egr_types || orig_egr_types)) {
> + if ((ing_types || egr_types) && !(orig_ing_types || orig_egr_types)) {
> err = mlxsw_sp_nve_inc_parsing_depth_get(mlxsw_sp);
> if (err) {
> netdev_err(mlxsw_sp_port->dev, "Failed to increase parsing depth");
> return err;
> }
> }
> - if (!(ing_types || egr_types) && (orig_egr_types || orig_egr_types))
> + if (!(ing_types || egr_types) && (orig_ing_types || orig_egr_types))
> mlxsw_sp_nve_inc_parsing_depth_put(mlxsw_sp);
>
> return mlxsw_sp1_ptp_mtpppc_set(mlxsw_sp_port->mlxsw_sp,
>
> --
>
> V2: fix both occurances of this typo. Thanks to Petr Machata for spotting
> the 2nd occurrance
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types
2019-07-30 11:47 [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types Colin King
2019-07-30 12:19 ` Petr Machata
2019-07-30 12:22 ` Colin Ian King
@ 2019-07-30 17:20 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-07-30 17:20 UTC (permalink / raw)
To: colin.king; +Cc: petrm, jiri, idosch, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 30 Jul 2019 12:47:52 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently are duplicated checks on orig_egr_types which are
> redundant, I believe this is a typo and should actually be
> orig_ing_types || orig_egr_types instead of the expression
> orig_egr_types || orig_egr_types. Fix these.
>
> Addresses-Coverity: ("Same on both sides")
> Fixes: c6b36bdd04b5 ("mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied to net.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-30 17:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 11:47 [PATCH][net-next][V2] mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types Colin King
2019-07-30 12:19 ` Petr Machata
2019-07-30 12:22 ` Colin Ian King
2019-07-30 17:20 ` 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).