[3/4] net/hns3: remove unnecessary branch
diff mbox series

Message ID 20200116092706.17388-4-huwei013@chinasoftinc.com
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series
  • improvement and cleanup for hns3 PMD driver
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Wei Hu (Xavier) Jan. 16, 2020, 9:27 a.m. UTC
From: Lijun Ou <oulijun@huawei.com>

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 <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 9866d147b..918fbe076 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);
 }