X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Finfiniband%2Fhw%2Fhns%2Fhns_roce_alloc.c;h=eef5df196af6c1a4221bdf5afd54a4d63267ac73;hb=38e375b7710f37a8ec98ec44baf2468e442206d9;hp=f950ec41a3f0574f69b621426350b797ba2876f2;hpb=1bc530c79d9346e3298359d4dbdbad204d078885;p=linux-2.6-microblaze.git diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c index f950ec41a3f0..eef5df196af6 100644 --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c @@ -63,16 +63,14 @@ int hns_roce_bitmap_alloc(struct hns_roce_bitmap *bitmap, unsigned long *obj) return ret; } -void hns_roce_bitmap_free(struct hns_roce_bitmap *bitmap, unsigned long obj, - int rr) +void hns_roce_bitmap_free(struct hns_roce_bitmap *bitmap, unsigned long obj) { obj &= bitmap->max + bitmap->reserved_top - 1; spin_lock(&bitmap->lock); clear_bit(obj, bitmap->table); - if (!rr) - bitmap->last = min(bitmap->last, obj); + bitmap->last = min(bitmap->last, obj); bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) & bitmap->mask; spin_unlock(&bitmap->lock);