mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-07 00:59:06 +00:00
RDMA/hns: Remove the unused hns_roce_bitmap_free_range function
hns_roce_bitmap_free_range() is only called inside hns_roce_bitmap_free(), and the input parameter "cnt" is set to a constant 1. In addition, the driver does not use alloc_range scenarios, so free_range does not need to exist. Link: https://lore.kernel.org/r/1623325814-55737-3-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li <liyangyang20@huawei.com> Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
24977edbb5
commit
1bc530c79d
2 changed files with 1 additions and 14 deletions
|
@ -66,20 +66,10 @@ int hns_roce_bitmap_alloc(struct hns_roce_bitmap *bitmap, unsigned long *obj)
|
||||||
void hns_roce_bitmap_free(struct hns_roce_bitmap *bitmap, unsigned long obj,
|
void hns_roce_bitmap_free(struct hns_roce_bitmap *bitmap, unsigned long obj,
|
||||||
int rr)
|
int rr)
|
||||||
{
|
{
|
||||||
hns_roce_bitmap_free_range(bitmap, obj, 1, rr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hns_roce_bitmap_free_range(struct hns_roce_bitmap *bitmap,
|
|
||||||
unsigned long obj, int cnt,
|
|
||||||
int rr)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
obj &= bitmap->max + bitmap->reserved_top - 1;
|
obj &= bitmap->max + bitmap->reserved_top - 1;
|
||||||
|
|
||||||
spin_lock(&bitmap->lock);
|
spin_lock(&bitmap->lock);
|
||||||
for (i = 0; i < cnt; i++)
|
clear_bit(obj, bitmap->table);
|
||||||
clear_bit(obj + i, bitmap->table);
|
|
||||||
|
|
||||||
if (!rr)
|
if (!rr)
|
||||||
bitmap->last = min(bitmap->last, obj);
|
bitmap->last = min(bitmap->last, obj);
|
||||||
|
|
|
@ -1162,9 +1162,6 @@ int hns_roce_bitmap_init(struct hns_roce_bitmap *bitmap, u32 num, u32 mask,
|
||||||
u32 reserved_bot, u32 resetrved_top);
|
u32 reserved_bot, u32 resetrved_top);
|
||||||
void hns_roce_bitmap_cleanup(struct hns_roce_bitmap *bitmap);
|
void hns_roce_bitmap_cleanup(struct hns_roce_bitmap *bitmap);
|
||||||
void hns_roce_cleanup_bitmap(struct hns_roce_dev *hr_dev);
|
void hns_roce_cleanup_bitmap(struct hns_roce_dev *hr_dev);
|
||||||
void hns_roce_bitmap_free_range(struct hns_roce_bitmap *bitmap,
|
|
||||||
unsigned long obj, int cnt,
|
|
||||||
int rr);
|
|
||||||
|
|
||||||
int hns_roce_create_ah(struct ib_ah *ah, struct rdma_ah_init_attr *init_attr,
|
int hns_roce_create_ah(struct ib_ah *ah, struct rdma_ah_init_attr *init_attr,
|
||||||
struct ib_udata *udata);
|
struct ib_udata *udata);
|
||||||
|
|
Loading…
Reference in a new issue