Commit 213666a3 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

mlxsw: spectrum_router: Simplify a piece of code

Express the same logic more succinctly.
Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56b8a9ed
...@@ -1752,9 +1752,9 @@ mlxsw_sp_nexthop_group_refresh(struct mlxsw_sp *mlxsw_sp, ...@@ -1752,9 +1752,9 @@ mlxsw_sp_nexthop_group_refresh(struct mlxsw_sp *mlxsw_sp,
static void __mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp_nexthop *nh, static void __mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp_nexthop *nh,
bool removing) bool removing)
{ {
if (!removing && !nh->should_offload) if (!removing)
nh->should_offload = 1; nh->should_offload = 1;
else if (removing && nh->offloaded) else if (nh->offloaded)
nh->should_offload = 0; nh->should_offload = 0;
nh->update = 1; nh->update = 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment