mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
RDMA/hns: Remove redundant 'bt_level' for hem_list_alloc_item()
The 'bt_level' parameter is not used in hem_list_alloc_item(), so remove it. Link: https://lore.kernel.org/r/20220922123315.3732205-6-xuhaoyue1@hisilicon.com Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
bb4874af19
commit
be1eeb667e
1 changed files with 4 additions and 4 deletions
|
@ -986,7 +986,7 @@ struct hns_roce_hem_head {
|
||||||
|
|
||||||
static struct hns_roce_hem_item *
|
static struct hns_roce_hem_item *
|
||||||
hem_list_alloc_item(struct hns_roce_dev *hr_dev, int start, int end, int count,
|
hem_list_alloc_item(struct hns_roce_dev *hr_dev, int start, int end, int count,
|
||||||
bool exist_bt, int bt_level)
|
bool exist_bt)
|
||||||
{
|
{
|
||||||
struct hns_roce_hem_item *hem;
|
struct hns_roce_hem_item *hem;
|
||||||
|
|
||||||
|
@ -1195,7 +1195,7 @@ static int hem_list_alloc_mid_bt(struct hns_roce_dev *hr_dev,
|
||||||
start_aligned = (distance / step) * step + r->offset;
|
start_aligned = (distance / step) * step + r->offset;
|
||||||
end = min_t(int, start_aligned + step - 1, max_ofs);
|
end = min_t(int, start_aligned + step - 1, max_ofs);
|
||||||
cur = hem_list_alloc_item(hr_dev, start_aligned, end, unit,
|
cur = hem_list_alloc_item(hr_dev, start_aligned, end, unit,
|
||||||
true, level);
|
true);
|
||||||
if (!cur) {
|
if (!cur) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_exit;
|
goto err_exit;
|
||||||
|
@ -1247,7 +1247,7 @@ alloc_root_hem(struct hns_roce_dev *hr_dev, int unit, int *max_ba_num,
|
||||||
/* indicate to last region */
|
/* indicate to last region */
|
||||||
r = ®ions[region_cnt - 1];
|
r = ®ions[region_cnt - 1];
|
||||||
hem = hem_list_alloc_item(hr_dev, offset, r->offset + r->count - 1,
|
hem = hem_list_alloc_item(hr_dev, offset, r->offset + r->count - 1,
|
||||||
ba_num, true, 0);
|
ba_num, true);
|
||||||
if (!hem)
|
if (!hem)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
@ -1264,7 +1264,7 @@ static int alloc_fake_root_bt(struct hns_roce_dev *hr_dev, void *cpu_base,
|
||||||
struct hns_roce_hem_item *hem;
|
struct hns_roce_hem_item *hem;
|
||||||
|
|
||||||
hem = hem_list_alloc_item(hr_dev, r->offset, r->offset + r->count - 1,
|
hem = hem_list_alloc_item(hr_dev, r->offset, r->offset + r->count - 1,
|
||||||
r->count, false, 0);
|
r->count, false);
|
||||||
if (!hem)
|
if (!hem)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue