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 42676A051C; Tue, 11 Feb 2020 12:50:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8F0031C0C2; Tue, 11 Feb 2020 12:50:32 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2A13A1C0BF for ; Tue, 11 Feb 2020 12:50:29 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Feb 2020 03:50:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,428,1574150400"; d="scan'208";a="433657146" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by fmsmga006.fm.intel.com with ESMTP; 11 Feb 2020 03:50:27 -0800 Date: Tue, 11 Feb 2020 19:49:11 +0800 From: Ye Xiaolong To: Shougang Wang Cc: dev@dpdk.org, qiming.yang@intel.com Message-ID: <20200211114911.GL80720@intel.com> References: <20200211071359.17085-1-shougangx.wang@intel.com> <20200211092622.20667-1-shougangx.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200211092622.20667-1-shougangx.wang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix coverity issue 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" On 02/11, Shougang Wang wrote: >This patch fixes (Logically dead code ) coverity issue. > >Coverity issue: 353624 >Fixes: ba7b12dd64e4 ("net/ixgbe: fix link up in FreeBSD") > >Signed-off-by: Shougang Wang >--- > drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c >index 7ea1962f6..2a248a3f2 100644 >--- a/drivers/net/ixgbe/ixgbe_ethdev.c >+++ b/drivers/net/ixgbe/ixgbe_ethdev.c >@@ -4128,13 +4128,10 @@ static int > ixgbe_wait_for_link_up(struct ixgbe_hw *hw) > { > #ifdef RTE_EXEC_ENV_FREEBSD >- const int nb_iter = 25; >-#else >- const int nb_iter = 0; >-#endif > int err, i; > bool link_up = false; > uint32_t speed = 0; >+ const int nb_iter = 25; > > for (i = 0; i < nb_iter; i++) { > err = ixgbe_check_link(hw, &speed, &link_up, 0); >@@ -4144,7 +4141,12 @@ ixgbe_wait_for_link_up(struct ixgbe_hw *hw) > return 0; > msec_delay(200); > } >+ >+ return 0; >+#else >+ RTE_SET_USED(hw); > return 0; >+#endif > } > > /* return 0 means link status changed, -1 means not changed */ >-- >2.17.1 > Acked-by: Xiaolong Ye Applied to dpdk-next-net-intel, Thanks.