Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dan.carpenter@oracle.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dan Carpenter and committed by
David S. Miller
eafa6abd 0ebc5b62

+1 -2
+1 -2
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
··· 1307 1307 return false; 1308 1308 1309 1309 return (action & (MLX5_FLOW_CONTEXT_ACTION_DROP | 1310 - MLX5_FLOW_CONTEXT_ACTION_FWD_DEST)) && 1311 - (action & MLX5_FLOW_CONTEXT_ACTION_COUNT); 1310 + MLX5_FLOW_CONTEXT_ACTION_FWD_DEST)); 1312 1311 } 1313 1312 1314 1313 static bool dest_is_valid(struct mlx5_flow_destination *dest,