net/mlx5: remove a duplicate condition
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Nov 2016 11:03:45 +0000 (14:03 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Nov 2016 01:28:28 +0000 (20:28 -0500)
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>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

index 68ec4ea25d5059362a54eb427869c0456d092b87..a263d8904a4cf84de718ad9dd4b2d8ddca9a5194 100644 (file)
@@ -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,