mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user