On 5/7/21 12:06 PM, Philippe Mathieu-Daudé wrote: > Document the following functions return the bitmap size > if not matching bit is found:
s/not/no/ > > - find_first_bit > - find_next_bit > - find_last_bit > - find_first_zero_bit > - find_next_zero_bit > > Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> > --- > include/qemu/bitops.h | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > @@ -150,6 +151,9 @@ unsigned long find_last_bit(const unsigned long *addr, > * @addr: The address to base the search on > * @offset: The bitnumber to start searching at > * @size: The bitmap size in bits > + * > + * Returns the bit number of the next set bit, > + * or @size if there is no set bit in the bitmap. > */ > unsigned long find_next_bit(const unsigned long *addr, Misleading - there might be a set bit prior to @offset. Better might be: or @size if there are no further set bits in the bitmap. > unsigned long size, > @@ -160,6 +164,9 @@ unsigned long find_next_bit(const unsigned long *addr, > * @addr: The address to base the search on > * @offset: The bitnumber to start searching at > * @size: The bitmap size in bits > + * > + * Returns the bit number of the next cleared bit, > + * or @size if there is no clear bit in the bitmap. > */ > > unsigned long find_next_zero_bit(const unsigned long *addr, similarly, or @size if there are no further clear bits in the bitmap. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org