lib/bitmap: remove bitmap_ord_to_pos

Now that we have find_nth_bit(), we can drop bitmap_ord_to_pos().

Signed-off-by: Yury Norov <yury.norov@gmail.com>
This commit is contained in:
Yury Norov
2022-09-17 20:07:15 -07:00
parent e3783c805d
commit 97848c10f9
3 changed files with 4 additions and 36 deletions

View File

@@ -508,8 +508,7 @@ static inline int node_random(const nodemask_t *maskp)
w = nodes_weight(*maskp);
if (w)
bit = bitmap_ord_to_pos(maskp->bits,
get_random_int() % w, MAX_NUMNODES);
bit = find_nth_bit(maskp->bits, MAX_NUMNODES, get_random_int() % w);
return bit;
#else
return 0;