aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/bitops
diff options
context:
space:
mode:
authorCody P Schafer <cody@linux.vnet.ibm.com>2013-11-12 18:09:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:22 -0500
commitec778edf97dcaa517e5b0eea6f1a9ba9d476e4a8 (patch)
treea9b092d8a94ada73d76da694b38d9af290177f5f /include/asm-generic/bitops
parentc962f7b95c98d2b42019cc9cb074886d177ee3a3 (diff)
bitops/find: clarify and extend documentation
Add return value documentation and clarify the units of the @size parameter. Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Cody P Schafer <cody@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/bitops')
-rw-r--r--include/asm-generic/bitops/find.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops/find.h
index 71c778033f57..998d4d544f18 100644
--- a/include/asm-generic/bitops/find.h
+++ b/include/asm-generic/bitops/find.h
@@ -7,6 +7,9 @@
7 * @addr: The address to base the search on 7 * @addr: The address to base the search on
8 * @offset: The bitnumber to start searching at 8 * @offset: The bitnumber to start searching at
9 * @size: The bitmap size in bits 9 * @size: The bitmap size in bits
10 *
11 * Returns the bit number for the next set bit
12 * If no bits are set, returns @size.
10 */ 13 */
11extern unsigned long find_next_bit(const unsigned long *addr, unsigned long 14extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
12 size, unsigned long offset); 15 size, unsigned long offset);
@@ -18,6 +21,9 @@ extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
18 * @addr: The address to base the search on 21 * @addr: The address to base the search on
19 * @offset: The bitnumber to start searching at 22 * @offset: The bitnumber to start searching at
20 * @size: The bitmap size in bits 23 * @size: The bitmap size in bits
24 *
25 * Returns the bit number of the next zero bit
26 * If no bits are zero, returns @size.
21 */ 27 */
22extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned 28extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
23 long size, unsigned long offset); 29 long size, unsigned long offset);
@@ -28,9 +34,10 @@ extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
28/** 34/**
29 * find_first_bit - find the first set bit in a memory region 35 * find_first_bit - find the first set bit in a memory region
30 * @addr: The address to start the search at 36 * @addr: The address to start the search at
31 * @size: The maximum size to search 37 * @size: The maximum number of bits to search
32 * 38 *
33 * Returns the bit number of the first set bit. 39 * Returns the bit number of the first set bit.
40 * If no bits are set, returns @size.
34 */ 41 */
35extern unsigned long find_first_bit(const unsigned long *addr, 42extern unsigned long find_first_bit(const unsigned long *addr,
36 unsigned long size); 43 unsigned long size);
@@ -38,9 +45,10 @@ extern unsigned long find_first_bit(const unsigned long *addr,
38/** 45/**
39 * find_first_zero_bit - find the first cleared bit in a memory region 46 * find_first_zero_bit - find the first cleared bit in a memory region
40 * @addr: The address to start the search at 47 * @addr: The address to start the search at
41 * @size: The maximum size to search 48 * @size: The maximum number of bits to search
42 * 49 *
43 * Returns the bit number of the first cleared bit. 50 * Returns the bit number of the first cleared bit.
51 * If no bits are zero, returns @size.
44 */ 52 */
45extern unsigned long find_first_zero_bit(const unsigned long *addr, 53extern unsigned long find_first_zero_bit(const unsigned long *addr,
46 unsigned long size); 54 unsigned long size);