From: Qi Zhang Date: Mon, 7 Sep 2020 11:06:51 +0000 (+0800) Subject: net/ice/base: remove unnecessary conditional X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=374c4bcaa0a9eeb4f9751117d6a1d91e79401baf;p=dpdk.git net/ice/base: remove unnecessary conditional These two conditional statements are unnecessary because the condition is always true based on existing code flow. Remove them to resolve potential errors from some static analysis tools. Signed-off-by: Bruce Allan Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index 1f621ca881..cd3ce82311 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -1089,7 +1089,7 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params, */ if (fld == ICE_FLOW_FIELD_IDX_IPV4_TTL) sib = ICE_FLOW_FIELD_IDX_IPV4_PROT; - else if (fld == ICE_FLOW_FIELD_IDX_IPV4_PROT) + else sib = ICE_FLOW_FIELD_IDX_IPV4_TTL; /* If the sibling field is also included, that field's @@ -1108,7 +1108,7 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params, */ if (fld == ICE_FLOW_FIELD_IDX_IPV6_TTL) sib = ICE_FLOW_FIELD_IDX_IPV6_PROT; - else if (fld == ICE_FLOW_FIELD_IDX_IPV6_PROT) + else sib = ICE_FLOW_FIELD_IDX_IPV6_TTL; /* If the sibling field is also included, that field's