diff options
| author | Yury Norov <[email protected]> | 2021-05-07 01:03:18 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-05-07 02:24:12 +0000 |
| commit | eaae7841ba83bb42dcac3177dc65f8dd974e6c0b (patch) | |
| tree | dadd6ed00af53e1ae2f0bdf09114604598961719 /tools/lib/find_bit.c | |
| parent | lib: add fast path for find_first_*_bit() and find_last_bit() (diff) | |
| download | kernel-eaae7841ba83bb42dcac3177dc65f8dd974e6c0b.tar.gz kernel-eaae7841ba83bb42dcac3177dc65f8dd974e6c0b.zip | |
tools: sync lib/find_bit implementation
Add fast paths to find_*_bit() functions as per kernel implementation.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yury Norov <[email protected]>
Acked-by: Rasmus Villemoes <[email protected]>
Cc: Alexey Klimov <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: David Sterba <[email protected]>
Cc: Dennis Zhou <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Jianpeng Ma <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: John Paul Adrian Glaubitz <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: Stefano Brivio <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: Wolfram Sang <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/lib/find_bit.c')
| -rw-r--r-- | tools/lib/find_bit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/find_bit.c b/tools/lib/find_bit.c index 589fd2f26f94..109aa7ffcf97 100644 --- a/tools/lib/find_bit.c +++ b/tools/lib/find_bit.c @@ -83,7 +83,7 @@ unsigned long _find_next_bit(const unsigned long *addr1, /* * Find the first set bit in a memory region. */ -unsigned long find_first_bit(const unsigned long *addr, unsigned long size) +unsigned long _find_first_bit(const unsigned long *addr, unsigned long size) { unsigned long idx; @@ -100,7 +100,7 @@ unsigned long find_first_bit(const unsigned long *addr, unsigned long size) /* * Find the first cleared bit in a memory region. */ -unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size) +unsigned long _find_first_zero_bit(const unsigned long *addr, unsigned long size) { unsigned long idx; |
