Skip to content

Commit

Permalink
net/ixgbe: remove dead code
Browse files Browse the repository at this point in the history
[ upstream commit e07e2ca ]

This patch fixes (Logically dead code) coverity issue.

Coverity issue: 353624
Fixes: ba7b12d ("net/ixgbe: fix link up in FreeBSD")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
  • Loading branch information
Shougang Wang authored and kevintraynor committed Feb 19, 2020
1 parent 29731e2 commit 7c7b832
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/ixgbe/ixgbe_ethdev.c
Expand Up @@ -4096,12 +4096,9 @@ 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, link_up = 0;
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);
Expand All @@ -4111,7 +4108,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 */
Expand Down

0 comments on commit 7c7b832

Please sign in to comment.