From 02aa899d600059560ab7392ff13e111a497c44da Mon Sep 17 00:00:00 2001 From: "Wei Hu (Xavier)" Date: Sat, 21 Dec 2019 18:32:51 +0800 Subject: [PATCH] net/hns3: remove useless variable initializations This patch removes the redundant initialization of the variable named ret. Signed-off-by: Hongbo Zheng Signed-off-by: Hao Chen Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_ethdev.c | 10 +++++----- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 4ce9515a92..49aef7dbc8 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -3597,7 +3597,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); @@ -3614,7 +3614,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); @@ -3632,7 +3632,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); @@ -3649,7 +3649,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) @@ -4135,7 +4135,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 92ed32631a..10969011b0 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)) -- 2.20.1