From: "Wei Hu (Xavier)" <huwei013@chinasoftinc.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH v3 7/9] net/hns3: remove the redundant variable initialization
Date: Sat, 21 Dec 2019 18:32:51 +0800 [thread overview]
Message-ID: <20191221103253.30746-8-huwei013@chinasoftinc.com> (raw)
In-Reply-To: <20191221103253.30746-1-huwei013@chinasoftinc.com>
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(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 4ce9515a9..49aef7dbc 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 92ed32631..10969011b 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.23.0
next prev parent reply other threads:[~2019-12-21 10:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-21 10:32 [dpdk-dev] [PATCH v3 0/9] updates for hns3 PMD driver Wei Hu (Xavier)
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 1/9] net/hns3: support Rx interrupt Wei Hu (Xavier)
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 2/9] net/hns3: get link state change through mailbox Wei Hu (Xavier)
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 3/9] net/hns3: modify the return value of enable msix Wei Hu (Xavier)
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 4/9] net/hns3: modify custom macro Wei Hu (Xavier)
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 5/9] net/hns3: optimize RSS's default algorithm Wei Hu (Xavier)
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 6/9] net/hns3: remove the redundant function call Wei Hu (Xavier)
2019-12-21 10:32 ` Wei Hu (Xavier) [this message]
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 8/9] net/hns3: remove the unnecessary assignment Wei Hu (Xavier)
2019-12-21 10:32 ` [dpdk-dev] [PATCH v3 9/9] net/hns3: remove the unused macros Wei Hu (Xavier)
2020-01-08 18:18 ` [dpdk-dev] [PATCH v3 0/9] updates for hns3 PMD driver Ferruh Yigit
2020-01-09 3:10 ` Wei Hu (Xavier)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191221103253.30746-8-huwei013@chinasoftinc.com \
--to=huwei013@chinasoftinc.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).