Commit 879e2886 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'bitmap-for-6.9' of https://github.com/norov/linux

Pull bitmap updates from Yury Norov:
 "A couple of random cleanups plus a step-down patch from Andy"

* tag 'bitmap-for-6.9' of https://github.com/norov/linux:
  bitmap: Step down as a reviewer
  lib/find: optimize find_*_bit_wrap
  lib/find_bit: Fix the code comments about find_next_bit_wrap
parents 23956900 fd8ed16c
...@@ -3598,7 +3598,6 @@ F: include/uapi/linux/bfs_fs.h ...@@ -3598,7 +3598,6 @@ F: include/uapi/linux/bfs_fs.h
BITMAP API BITMAP API
M: Yury Norov <yury.norov@gmail.com> M: Yury Norov <yury.norov@gmail.com>
R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
R: Rasmus Villemoes <linux@rasmusvillemoes.dk> R: Rasmus Villemoes <linux@rasmusvillemoes.dk>
S: Maintained S: Maintained
F: include/linux/bitfield.h F: include/linux/bitfield.h
......
...@@ -405,7 +405,7 @@ unsigned long find_next_and_bit_wrap(const unsigned long *addr1, ...@@ -405,7 +405,7 @@ unsigned long find_next_and_bit_wrap(const unsigned long *addr1,
{ {
unsigned long bit = find_next_and_bit(addr1, addr2, size, offset); unsigned long bit = find_next_and_bit(addr1, addr2, size, offset);
if (bit < size) if (bit < size || offset == 0)
return bit; return bit;
bit = find_first_and_bit(addr1, addr2, offset); bit = find_first_and_bit(addr1, addr2, offset);
...@@ -413,8 +413,8 @@ unsigned long find_next_and_bit_wrap(const unsigned long *addr1, ...@@ -413,8 +413,8 @@ unsigned long find_next_and_bit_wrap(const unsigned long *addr1,
} }
/** /**
* find_next_bit_wrap - find the next set bit in both memory regions * find_next_bit_wrap - find the next set bit in a memory region
* @addr: The first address to base the search on * @addr: The address to base the search on
* @size: The bitmap size in bits * @size: The bitmap size in bits
* @offset: The bitnumber to start searching at * @offset: The bitnumber to start searching at
* *
...@@ -427,7 +427,7 @@ unsigned long find_next_bit_wrap(const unsigned long *addr, ...@@ -427,7 +427,7 @@ unsigned long find_next_bit_wrap(const unsigned long *addr,
{ {
unsigned long bit = find_next_bit(addr, size, offset); unsigned long bit = find_next_bit(addr, size, offset);
if (bit < size) if (bit < size || offset == 0)
return bit; return bit;
bit = find_first_bit(addr, offset); bit = find_first_bit(addr, offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment