diff options
| author | Yury Norov <[email protected]> | 2021-08-14 21:17:03 +0000 |
|---|---|---|
| committer | Yury Norov <[email protected]> | 2022-01-15 16:47:31 +0000 |
| commit | b5c7e7ec7d3418af2544452b45cc67297c857a86 (patch) | |
| tree | 1b2d0bd3d0852b65d73b65982d4b8f69c27703e7 /lib/genalloc.c | |
| parent | cpumask: use find_first_and_bit() (diff) | |
| download | kernel-b5c7e7ec7d3418af2544452b45cc67297c857a86.tar.gz kernel-b5c7e7ec7d3418af2544452b45cc67297c857a86.zip | |
all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate
find_first{,_zero}_bit is a more effective analogue of 'next' version if
start == 0. This patch replaces 'next' with 'first' where things look
trivial.
Signed-off-by: Yury Norov <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'lib/genalloc.c')
| -rw-r--r-- | lib/genalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c index 9a57257988c7..00fc50d0a640 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c @@ -251,7 +251,7 @@ void gen_pool_destroy(struct gen_pool *pool) list_del(&chunk->next_chunk); end_bit = chunk_size(chunk) >> order; - bit = find_next_bit(chunk->bits, end_bit, 0); + bit = find_first_bit(chunk->bits, end_bit); BUG_ON(bit < end_bit); vfree(chunk); |
