From: Barry Song <song.bao.hua@hisilicon.com>
To: <davem@davemloft.net>, <kuba@kernel.org>
Cc: <yisen.zhuang@huawei.com>, <salil.mehta@huawei.com>,
<netdev@vger.kernel.org>, <linyunsheng@huawei.com>,
<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>,
Barry Song <song.bao.hua@hisilicon.com>
Subject: [PATCH 3/5] net: hns3: rename buffer-related functions
Date: Thu, 18 Jun 2020 13:02:09 +1200 [thread overview]
Message-ID: <20200618010211.75840-4-song.bao.hua@hisilicon.com> (raw)
In-Reply-To: <20200618010211.75840-1-song.bao.hua@hisilicon.com>
This is for improving the readability.
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 61b5a849b162..3cd2216e49b9 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2405,7 +2405,7 @@ static int hns3_alloc_desc(struct hns3_enet_ring *ring)
return 0;
}
-static int hns3_reserve_buffer_map(struct hns3_enet_ring *ring,
+static int hns3_alloc_and_map_buffer(struct hns3_enet_ring *ring,
struct hns3_desc_cb *cb)
{
int ret;
@@ -2426,9 +2426,9 @@ static int hns3_reserve_buffer_map(struct hns3_enet_ring *ring,
return ret;
}
-static int hns3_alloc_buffer_attach(struct hns3_enet_ring *ring, int i)
+static int hns3_alloc_and_attach_buffer(struct hns3_enet_ring *ring, int i)
{
- int ret = hns3_reserve_buffer_map(ring, &ring->desc_cb[i]);
+ int ret = hns3_alloc_and_map_buffer(ring, &ring->desc_cb[i]);
if (ret)
return ret;
@@ -2444,7 +2444,7 @@ static int hns3_alloc_ring_buffers(struct hns3_enet_ring *ring)
int i, j, ret;
for (i = 0; i < ring->desc_num; i++) {
- ret = hns3_alloc_buffer_attach(ring, i);
+ ret = hns3_alloc_and_attach_buffer(ring, i);
if (ret)
goto out_buffer_fail;
}
@@ -2590,7 +2590,7 @@ static void hns3_nic_alloc_rx_buffers(struct hns3_enet_ring *ring,
hns3_reuse_buffer(ring, ring->next_to_use);
} else {
- ret = hns3_reserve_buffer_map(ring, &res_cbs);
+ ret = hns3_alloc_and_map_buffer(ring, &res_cbs);
if (ret) {
u64_stats_update_begin(&ring->syncp);
ring->stats.sw_err_cnt++;
@@ -4184,7 +4184,7 @@ static int hns3_clear_rx_ring(struct hns3_enet_ring *ring)
* stack, so we need to replace the buffer here.
*/
if (!ring->desc_cb[ring->next_to_use].reuse_flag) {
- ret = hns3_reserve_buffer_map(ring, &res_cbs);
+ ret = hns3_alloc_and_map_buffer(ring, &res_cbs);
if (ret) {
u64_stats_update_begin(&ring->syncp);
ring->stats.sw_err_cnt++;
--
2.23.0
next prev parent reply other threads:[~2020-06-18 1:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 1:02 [PATCH 0/5] net: hns3: a bundle of minor cleanup and fixes Barry Song
2020-06-18 1:02 ` [PATCH 1/5] net: hns3: remove unnecessary devm_kfree Barry Song
2020-06-18 1:02 ` [PATCH 2/5] net: hns3: pointer type of buffer should be void Barry Song
2020-06-18 23:35 ` Jakub Kicinski
2020-06-18 1:02 ` Barry Song [this message]
2020-06-18 1:02 ` [PATCH 4/5] net: hns3: replace disable_irq by IRQ_NOAUTOEN flag Barry Song
2020-06-18 1:02 ` [PATCH 5/5] net: hns3: streaming dma buffer sync between cpu and device Barry Song
2020-06-19 3:43 ` [PATCH 0/5] net: hns3: a bundle of minor cleanup and fixes David Miller
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=20200618010211.75840-4-song.bao.hua@hisilicon.com \
--to=song.bao.hua@hisilicon.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=linyunsheng@huawei.com \
--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 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).