Instead of handling ffz(~overlap) == bit as a special case, handle
this case in the same way as ffz(~overlap) != bit. This patch does
not change any functionality but removes one if-instruction from the
hot path.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
*/
overlap = al->map[offset] & mask;
if (overlap == mask) {
-done:
data->set_bits = 0;
return true;
}
if (overlap) {
- const int __bit = ffz(~overlap);
-
- nr_bits = __bit - bit;
- if (!nr_bits)
- goto done;
-
+ nr_bits = ffz(~overlap) - bit;
mask = bit_masks[nr_bits] << bit;
}