[7/9] net/hns3: remove the redundant variable initialization
diff mbox series

Message ID 20191202025126.73423-8-xavier.huwei@tom.com
State Under Review
Delegated to: Ferruh Yigit
Headers show
Series
  • updates 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) Dec. 2, 2019, 2:51 a.m. UTC
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>

This patch removes the redundant initialization of the variable
named ret.

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 10 +++++-----
 drivers/net/hns3/hns3_ethdev_vf.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index e401bc0d0..55caafc27 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3591,7 +3591,7 @@  hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	bool en_mc_pmc = (dev->data->all_multicast == 1) ? true : false;
-	int ret = 0;
+	int ret;
 
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_promisc_mode(hw, true, en_mc_pmc);
@@ -3608,7 +3608,7 @@  hns3_dev_promiscuous_disable(struct rte_eth_dev *dev)
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	bool en_mc_pmc = (dev->data->all_multicast == 1) ? true : false;
-	int ret = 0;
+	int ret;
 
 	/* If now in all_multicast mode, must remain in all_multicast mode. */
 	rte_spinlock_lock(&hw->lock);
@@ -3626,7 +3626,7 @@  hns3_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	bool en_uc_pmc = (dev->data->promiscuous == 1) ? true : false;
-	int ret = 0;
+	int ret;
 
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_promisc_mode(hw, en_uc_pmc, true);
@@ -3643,7 +3643,7 @@  hns3_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	bool en_uc_pmc = (dev->data->promiscuous == 1) ? true : false;
-	int ret = 0;
+	int ret;
 
 	/* If now in promiscuous mode, must remain in all_multicast mode. */
 	if (dev->data->promiscuous == 1)
@@ -4129,7 +4129,7 @@  hns3_dev_start(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	int ret = 0;
+	int ret;
 
 	PMD_INIT_FUNC_TRACE();
 	if (rte_atomic16_read(&hw->reset.resetting))
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 46d3efad0..45e061d96 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1465,7 +1465,7 @@  hns3vf_dev_start(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	int ret = 0;
+	int ret;
 
 	PMD_INIT_FUNC_TRACE();
 	if (rte_atomic16_read(&hw->reset.resetting))