| 145 | } |
| 146 | |
| 147 | static inline uint32_t |
| 148 | ccp_find_first_zero_bit(unsigned long *addr, uint32_t limit) |
| 149 | { |
| 150 | uint32_t i; |
| 151 | uint32_t nwords = 0; |
| 152 | |
| 153 | nwords = (limit - 1) / BITS_PER_WORD + 1; |
| 154 | for (i = 0; i < nwords; i++) { |
| 155 | if (addr[i] == 0UL) |
| 156 | return i * BITS_PER_WORD; |
| 157 | if (addr[i] < ~(0UL)) |
| 158 | break; |
| 159 | } |
| 160 | return (i == nwords) ? limit : i * BITS_PER_WORD + ccp_ffz(addr[i]); |
| 161 | } |
| 162 | |
| 163 | static void |
| 164 | ccp_bitmap_set(unsigned long *map, unsigned int start, int len) |
no test coverage detected