From: Lijun Ou Date: Thu, 16 Jan 2020 09:27:05 +0000 (+0800) Subject: net/hns3: remove unnecessary branch X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d13a7447a131a3a7078caf1d14e674e8add1d0a5;p=dpdk.git net/hns3: remove unnecessary branch 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) --- diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 9866d147be..918fbe076b 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -1473,8 +1473,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); }