Skip to content
Snippets Groups Projects
Commit c617a7aa authored by Barry Song's avatar Barry Song Committed by Yang Yingliang
Browse files

net: hns3: rename buffer-related functions


mainline inclusion
from mainline-v5.9-rc1
commit 4d2cad32
category: feature
bugzilla: NA
CVE: NA

----------------------------

This is for improving the readability.

Signed-off-by: default avatarBarry Song <song.bao.hua@hisilicon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: default avatarli yongxin <liyongxin1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent c01b4c6a
No related branches found
No related tags found
No related merge requests found
......@@ -2487,8 +2487,8 @@ static int hns3_alloc_desc(struct hns3_enet_ring *ring)
return 0;
}
static int hns3_reserve_buffer_map(struct hns3_enet_ring *ring,
struct hns3_desc_cb *cb)
static int hns3_alloc_and_map_buffer(struct hns3_enet_ring *ring,
struct hns3_desc_cb *cb)
{
int ret;
......@@ -2508,9 +2508,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;
......@@ -2526,7 +2526,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;
}
......@@ -2672,7 +2672,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++;
......@@ -4266,7 +4266,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++;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment