The definition of small_const_nbits
is:
#define small_const_nbits(nbits) \
(__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)
BITS_PER_LONG
is normally 32 or 64, depending on what machine you're on.
So, if you're trying to clear fewer than that many bits, you can certainly do it in a single operation - that's the first half of the if
statement. If it's longer than 32 or 64 bits, you need to set multiple words, and that's done by the memset
call.