Re: [PATCH] linux/bitmap.h: Improve BITMAP_{LAST,FIRST}_WORD_MASK

2015-03-08 Thread George Spelvin
Looks good. Reviewed-by: George Spelvin -- 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/

[PATCH] linux/bitmap.h: Improve BITMAP_{LAST,FIRST}_WORD_MASK

2015-02-18 Thread Rasmus Villemoes
The macro BITMAP_LAST_WORD_MASK can be implemented without a conditional, which will generally lead to slightly better generated code (221 bytes saved for allmodconfig-GCOV_KERNEL, ~2k with GCOV_KERNEL). As a small bonus, this also ensures that the nbits parameter is expanded exactly once. In BITM