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 B450AA04B3; Tue, 28 Jan 2020 08:31:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 45CC71C118; Tue, 28 Jan 2020 08:30:56 +0100 (CET) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id AFF951C0C9 for ; Tue, 28 Jan 2020 08:30:48 +0100 (CET) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id E776A29051D; Mon, 27 Jan 2020 23:30:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com E776A29051D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1580196648; bh=PSpNTerWi5+zKXPoVnqPaolalqu+l7meELcXv2FhZAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fV+2FyNTlcA84jafEbRBjUojSmkX09xYY3N+1k0dYXvvAFC67OSDT1QtK04KOk3x5 ZOEUeNvnk8/mLrW3PlKm/yQQPFi7wVpjEQzG5Jk/5yvQ8uZEzJwn5sUKEvCCwTxTT1 KWkFVdQMiAB5JKXZJHtfPxLTdkaM23rbjuCSjExo= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Tue, 28 Jan 2020 12:59:18 +0530 Message-Id: <20200128072923.9912-5-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200128072923.9912-1-somnath.kotur@broadcom.com> References: <20200128072923.9912-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 4/9] net/bnxt: remove redundant if statement 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" From: Kalesh AP 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 Reviewed-by: Ajit Kumar Khaparde Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 4 ---- 1 file changed, 4 deletions(-) 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. -- 1.8.3.1