bitmap: test for constant as well as small size for inline versions
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Dec 2008 22:35:13 +0000 (09:05 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Dec 2008 22:35:13 +0000 (09:05 +1030)
commit4b0bc0bca83f3fb7cf920e2ec80684c15d2269c0
treeb0a76e8b3d6e505deeaf5c1eba4db18c3ee20f35
parent278d1ed65e25d80af7c3a112d707b3f70516ddb4
bitmap: test for constant as well as small size for inline versions

Impact: reduce text size

bitmap_zero et al have a fastpath for nbits <= BITS_PER_LONG, but this
should really only apply where the nbits is known at compile time.

This only saves about 1200 bytes on an allyesconfig kernel, but with
cpumasks going variable that number will increase.

   text data bss dec hex filename
35327852        5035607 6782976 47146435        2cf65c3 vmlinux-before
35326640        5035607 6782976 47145223        2cf6107 vmlinux-after

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
include/linux/bitmap.h