Lines Matching full:size

17 extern unsigned long _find_first_bit(const unsigned long *addr, unsigned long size);
19 const unsigned long *addr2, unsigned long size);
20 extern unsigned long _find_first_zero_bit(const unsigned long *addr, unsigned long size);
26 * @size: The bitmap size in bits
30 * If no bits are set, returns @size.
33 unsigned long find_next_bit(const unsigned long *addr, unsigned long size, in find_next_bit() argument
36 if (small_const_nbits(size)) { in find_next_bit()
39 if (unlikely(offset >= size)) in find_next_bit()
40 return size; in find_next_bit()
42 val = *addr & GENMASK(size - 1, offset); in find_next_bit()
43 return val ? __ffs(val) : size; in find_next_bit()
46 return _find_next_bit(addr, size, offset); in find_next_bit()
55 * @size: The bitmap size in bits
59 * If no bits are set, returns @size.
63 const unsigned long *addr2, unsigned long size, in find_next_and_bit() argument
66 if (small_const_nbits(size)) { in find_next_and_bit()
69 if (unlikely(offset >= size)) in find_next_and_bit()
70 return size; in find_next_and_bit()
72 val = *addr1 & *addr2 & GENMASK(size - 1, offset); in find_next_and_bit()
73 return val ? __ffs(val) : size; in find_next_and_bit()
76 return _find_next_and_bit(addr1, addr2, size, offset); in find_next_and_bit()
84 * @size: The bitmap size in bits
88 * If no bits are zero, returns @size.
91 unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, in find_next_zero_bit() argument
94 if (small_const_nbits(size)) { in find_next_zero_bit()
97 if (unlikely(offset >= size)) in find_next_zero_bit()
98 return size; in find_next_zero_bit()
100 val = *addr | ~GENMASK(size - 1, offset); in find_next_zero_bit()
101 return val == ~0UL ? size : ffz(val); in find_next_zero_bit()
104 return _find_next_zero_bit(addr, size, offset); in find_next_zero_bit()
112 * @size: The maximum number of bits to search
115 * If no bits are set, returns @size.
118 unsigned long find_first_bit(const unsigned long *addr, unsigned long size) in find_first_bit() argument
120 if (small_const_nbits(size)) { in find_first_bit()
121 unsigned long val = *addr & GENMASK(size - 1, 0); in find_first_bit()
123 return val ? __ffs(val) : size; in find_first_bit()
126 return _find_first_bit(addr, size); in find_first_bit()
135 * @size: The bitmap size in bits
138 * If no bits are set, returns @size.
143 unsigned long size) in find_first_and_bit() argument
145 if (small_const_nbits(size)) { in find_first_and_bit()
146 unsigned long val = *addr1 & *addr2 & GENMASK(size - 1, 0); in find_first_and_bit()
148 return val ? __ffs(val) : size; in find_first_and_bit()
151 return _find_first_and_bit(addr1, addr2, size); in find_first_and_bit()
159 * @size: The maximum number of bits to search
162 * If no bits are zero, returns @size.
165 unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size) in find_first_zero_bit() argument
167 if (small_const_nbits(size)) { in find_first_zero_bit()
168 unsigned long val = *addr | ~GENMASK(size - 1, 0); in find_first_zero_bit()
170 return val == ~0UL ? size : ffz(val); in find_first_zero_bit()
173 return _find_first_zero_bit(addr, size); in find_first_zero_bit()