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 43971A04B3; Tue, 28 Jan 2020 22:02:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA1DE1D5BE; Tue, 28 Jan 2020 22:02:12 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id E196F1D5A4; Tue, 28 Jan 2020 22:02:05 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 51CD630C1FE; Tue, 28 Jan 2020 12:55:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 51CD630C1FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1580244911; bh=lHOf94dob/XH6/76bS6EfA8uyLJnNI9kHGGCZWppwQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qCLRDKhW/N1GWr4ab8t44soHmI1V35HSDazbguun2Oqqu+SDLcl5bZXcPk8jPL5ZF wVb3MGbqfDV/PspJrM2aU16dXvT0vzNCKiZ8izpj8FdZDU42mSxXd65losH2jz6V8H tlt0jpmBd4+Gb8f0SYK4JAzVzar1ufWQNxQFFSt8= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id CD19914008C; Tue, 28 Jan 2020 13:02:04 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , stable@dpdk.org, Somnath Kotur Date: Tue, 28 Jan 2020 13:01:54 -0800 Message-Id: <20200128210159.6972-5-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122.2) In-Reply-To: <20200128210159.6972-1-ajit.khaparde@broadcom.com> References: <20200128072923.9912-1-somnath.kotur@broadcom.com> <20200128210159.6972-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Signed-off-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- 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 fc3f1a8db..267a36148 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. -- 2.21.0 (Apple Git-122.2)