From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FCDFA04B5; Mon, 7 Sep 2020 13:31:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F6DA1C2E7; Mon, 7 Sep 2020 13:25:27 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2813D1C2B4 for ; Mon, 7 Sep 2020 13:25:26 +0200 (CEST) IronPort-SDR: /pe2d70h0bukYo/DP/LOKEx1yBzsHTAutzd9UrHFfq+rjGOEMT/Pzy0pPHgPdCKsT8tev/Og6d NQLZMRXrDv3w== X-IronPort-AV: E=McAfee;i="6000,8403,9736"; a="157252726" X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="157252726" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2020 04:25:25 -0700 IronPort-SDR: FySJI4b/K8MErYhPLLbb30HSwnV2I3Xlk3HWZWtjLWyEmrYr/2FSVCgHjFG2xH6RqqX9lPpDWC Tl9ORs1CHFtw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="328058970" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by fmsmga004.fm.intel.com with ESMTP; 07 Sep 2020 04:25:24 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Bruce Allan Date: Mon, 7 Sep 2020 19:28:24 +0800 Message-Id: <20200907112826.48493-39-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200907112826.48493-1-qi.z.zhang@intel.com> References: <20200907112826.48493-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH 38/40] net/ice/base: remove unnecessary conditional X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/ice/base/ice_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index b7705687c..e0920c73f 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 -- 2.13.6