On Sun, 23 Nov 2014, Matt Fleming wrote: > Something like this? > > first_bit = find_next_bit(map, nr_bits, -1); > zero_bit = find_next_zero_bit(map, nr_bits, first_bit); > > if (find_next_bit(map, nr_bits, zero_bit) < nr_bits) > return -EINVAL; /* non-contiguous bits */
Looks pretty self explaining, right? Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/