[4/9] net/bnxt: remove redundant if statement

Message ID 20200128072923.9912-5-somnath.kotur@broadcom.com (mailing list archive)
State Superseded, archived
Delegated to: Ajit Khaparde
Headers
Series bnxt patchset |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Somnath Kotur Jan. 28, 2020, 7:29 a.m. UTC
  From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Since "eth_dev->data->dev_started" has been assigned to 0 at the
beginning of bnxt_dev_stop_op() routine, the code inside the if()
condition is redundant. Remove it.

Anyways "eth_dev->data->dev_link.link_status" will be set to 0 in
bnxt_dev_set_link_down_op() later in the routine.

Fixes: 316e412299fd ("net/bnxt: fix crash when closing")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 4 ----
 1 file changed, 4 deletions(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fc3f1a8..267a361 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -948,10 +948,6 @@  static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	bnxt_cancel_fw_health_check(bp);
 
 	bp->flags &= ~BNXT_FLAG_INIT_DONE;
-	if (bp->eth_dev->data->dev_started) {
-		/* TBD: STOP HW queues DMA */
-		eth_dev->data->dev_link.link_status = 0;
-	}
 	bnxt_dev_set_link_down_op(eth_dev);
 
 	/* Wait for link to be reset and the async notification to process.