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 735D4A034C for ; Tue, 18 Aug 2020 09:16:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C85F1C042; Tue, 18 Aug 2020 09:16:04 +0200 (CEST) Received: from mail.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id ED1DE1C002 for ; Tue, 18 Aug 2020 09:16:01 +0200 (CEST) Received: from localhost.localdomain (120.133.139.157) by INCCAS001.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 18 Aug 2020 15:15:57 +0800 From: "Wei Hu (Xavier)" To: , CC: Date: Tue, 18 Aug 2020 15:15:38 +0800 Message-ID: <20200818071542.9766-4-huwei013@chinasoftinc.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200818071542.9766-1-huwei013@chinasoftinc.com> References: <20200817092532.59530-1-huwei013@chinasoftinc.com> <20200818071542.9766-1-huwei013@chinasoftinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [120.133.139.157] Subject: [dpdk-stable] [PATCH v3 3/7] net/hns3: remove unnecessary branch X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Lijun Ou [ upstream commit d13a7447a131a3a7078caf1d14e674e8add1d0a5 ] Because the rte layer of DPDK framework has already processed the case when the idx is zero before calling the '.mac_addr_remove' ops function, the input parameter named idx can not be zero in the '.mac_addr_remove' function. This patch removes unnecessary branch process to check whether input parameter named idx is zero in the '.mac_addr_remove' ops implementation function named hns3_remove_mac_addr. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_ethdev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index c31a9328a..128cd793d 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -1531,8 +1531,6 @@ hns3_remove_mac_addr(struct rte_eth_dev *dev, uint32_t idx) return; } - if (idx == 0) - hw->mac.default_addr_setted = false; rte_spinlock_unlock(&hw->lock); } -- 2.27.0