From: Shougang Wang Date: Tue, 11 Feb 2020 09:26:22 +0000 (+0000) Subject: net/ixgbe: remove dead code X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e07e2ca9e565ebb6fa7c70e3b9718046a011cc7a;p=dpdk.git net/ixgbe: remove dead code This patch fixes (Logically dead code) coverity issue. Coverity issue: 353624 Fixes: ba7b12dd64e4 ("net/ixgbe: fix link up in FreeBSD") Cc: stable@dpdk.org Signed-off-by: Shougang Wang Acked-by: Xiaolong Ye --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 7ea1962f60..2a248a3f27 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 */