net/mlx5: remove a duplicate condition
Subsystems (5)
PATCH 1/1 net/mlx5: remove a duplicate condition
We verified that MLX5_FLOW_CONTEXT_ACTION_COUNT was set on the first line of the function so we don't need to check again here.
Signed-off-by Dan Carpenter <[email protected]>
---
Not a bugfix so it would go into -next
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +1 -2
@@ -1307,8 +1307,7 @@ static bool counter_is_valid(struct mlx5_fc *counter, u32 action)return false;return (action & (MLX5_FLOW_CONTEXT_ACTION_DROP | -MLX5_FLOW_CONTEXT_ACTION_FWD_DEST )) && - (action &MLX5_FLOW_CONTEXT_ACTION_COUNT ); +MLX5_FLOW_CONTEXT_ACTION_FWD_DEST )); } static bool dest_is_valid(struct mlx5_flow_destination *dest,
Quoted 4 lines · Dan Carpenter
We verified that
MLX5_FLOW_CONTEXT_ACTION_COUNTwas set on the first line of the function so we don't need to check again here.Signed-off-by Dan Carpenter <[email protected]>
Acked-by Saeed Mahameed <[email protected]>
From: Dan Carpenter <[email protected]>
Date: Thu, 24 Nov 2016 14:03:45 +0300
Quoted 4 lines
We verified that
MLX5_FLOW_CONTEXT_ACTION_COUNTwas set on the first line of the function so we don't need to check again here.Signed-off-by Dan Carpenter <[email protected]>
Applied.