summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-07-08 18:47:37 +0200
committerLeon Romanovsky <leonro@nvidia.com>2022-07-18 12:03:28 +0300
commitfc4114736f5a4d642ed9d2a2062b3701e0ffc991 (patch)
tree713f61b9138ec240113d37c543d84deefd80022e /drivers/infiniband/ulp
parente471eedd94d95a183ed57f5875ec1a476f1442a4 (diff)
downloadlinux-fc4114736f5a4d642ed9d2a2062b3701e0ffc991.tar.bz2
RDMA/rtrs-clt: Use bitmap_empty()
Use bitmap_empty() instead of hand-writing them. Link: https://lore.kernel.org/r/b71ccfaf4a47dee8e1ad373604c861479d499b6b.1657298747.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/rtrs/rtrs-clt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 06c27a3d83f5..8441f0965b56 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -1433,12 +1433,10 @@ out_err:
static void free_permits(struct rtrs_clt_sess *clt)
{
- if (clt->permits_map) {
- size_t sz = clt->queue_depth;
-
+ if (clt->permits_map)
wait_event(clt->permits_wait,
- find_first_bit(clt->permits_map, sz) >= sz);
- }
+ bitmap_empty(clt->permits_map, clt->queue_depth));
+
bitmap_free(clt->permits_map);
clt->permits_map = NULL;
kfree(clt->permits);