All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>, <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <salil.mehta@huawei.com>,
	<yisen.zhuang@huawei.com>, <huangdaode@huawei.com>,
	<linuxarm@openeuler.org>, Huazhong Tan <tanhuazhong@huawei.com>
Subject: [PATCH net-next 09/12] net: hns3: remove redundant return value of hns3_uninit_all_ring()
Date: Mon, 8 Feb 2021 19:39:39 +0800	[thread overview]
Message-ID: <1612784382-27262-10-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1612784382-27262-1-git-send-email-tanhuazhong@huawei.com>

Since hns3_uninit_all_ring() only returns 0, so remove this
redundant return value and function declaration in hns3_enet.h.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 12 +++---------
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.h |  1 -
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 474b082..9565b79 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -4084,7 +4084,7 @@ int hns3_init_all_ring(struct hns3_nic_priv *priv)
 	return -ENOMEM;
 }
 
-int hns3_uninit_all_ring(struct hns3_nic_priv *priv)
+static void hns3_uninit_all_ring(struct hns3_nic_priv *priv)
 {
 	struct hnae3_handle *h = priv->ae_handle;
 	int i;
@@ -4093,7 +4093,6 @@ int hns3_uninit_all_ring(struct hns3_nic_priv *priv)
 		hns3_fini_ring(&priv->ring[i]);
 		hns3_fini_ring(&priv->ring[i + h->kinfo.num_tqps]);
 	}
-	return 0;
 }
 
 /* Set mac addr if it is configured. or leave it to the AE driver */
@@ -4321,7 +4320,6 @@ static void hns3_client_uninit(struct hnae3_handle *handle, bool reset)
 {
 	struct net_device *netdev = handle->kinfo.netdev;
 	struct hns3_nic_priv *priv = netdev_priv(netdev);
-	int ret;
 
 	if (netdev->reg_state != NETREG_UNINITIALIZED)
 		unregister_netdev(netdev);
@@ -4347,9 +4345,7 @@ static void hns3_client_uninit(struct hnae3_handle *handle, bool reset)
 
 	hns3_nic_dealloc_vector_data(priv);
 
-	ret = hns3_uninit_all_ring(priv);
-	if (ret)
-		netdev_err(netdev, "uninit ring error\n");
+	hns3_uninit_all_ring(priv);
 
 	hns3_put_ring_config(priv);
 
@@ -4662,9 +4658,7 @@ static int hns3_reset_notify_uninit_enet(struct hnae3_handle *handle)
 
 	hns3_nic_dealloc_vector_data(priv);
 
-	ret = hns3_uninit_all_ring(priv);
-	if (ret)
-		netdev_err(netdev, "uninit ring error\n");
+	hns3_uninit_all_ring(priv);
 
 	hns3_put_ring_config(priv);
 
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
index 7435a83..d069b04 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
@@ -605,7 +605,6 @@ int hns3_set_channels(struct net_device *netdev,
 
 void hns3_clean_tx_ring(struct hns3_enet_ring *ring, int budget);
 int hns3_init_all_ring(struct hns3_nic_priv *priv);
-int hns3_uninit_all_ring(struct hns3_nic_priv *priv);
 int hns3_nic_reset_all_ring(struct hnae3_handle *h);
 void hns3_fini_ring(struct hns3_enet_ring *ring);
 netdev_tx_t hns3_nic_net_xmit(struct sk_buff *skb, struct net_device *netdev);
-- 
2.7.4


  parent reply	other threads:[~2021-02-08 11:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 11:39 [PATCH net-next 00/12] net: hns3: some cleanups for -next Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 01/12] net: hns3: clean up some incorrect variable types in hclge_dbg_dump_tm_map() Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 02/12] net: hns3: remove redundant client_setup_tc handle Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 03/12] net: hns3: check cmdq message parameters sent from VF Huazhong Tan
2021-02-08 21:34   ` Jakub Kicinski
2021-02-09  1:26     ` Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 04/12] net: hns3: remove the shaper param magic number Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 05/12] net: hns3: clean up unnecessary parentheses in macro definitions Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 06/12] net: hns3: modify some unmacthed types print parameter Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 07/12] net: hns3: change hclge_parse_speed() param type Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 08/12] net: hns3: change hclge_query_bd_num() " Huazhong Tan
2021-02-08 11:39 ` Huazhong Tan [this message]
2021-02-08 11:39 ` [PATCH net-next 10/12] net: hns3: remove an unused parameter in hclge_vf_rate_param_check() Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 11/12] net: hns3: remove unused macro definition Huazhong Tan
2021-02-08 11:39 ` [PATCH net-next 12/12] net: hns3: cleanup for endian issue for VF RSS Huazhong Tan

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=1612784382-27262-10-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=huangdaode@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.