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 <shougangx.w...@intel.com> >--- > 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 <xiaolong...@intel.com> Applied to dpdk-next-net-intel, Thanks.