lib: bitmap: change parameter of bitmap_*_region to unsigned
authorRasmus Villemoes <[email protected]>
Wed, 6 Aug 2014 23:10:16 +0000 (16:10 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Aug 2014 01:01:26 +0000 (18:01 -0700)
commit9279d3286e10736766edcaf815ae10e00856e448
treee1cf25875387eed2cc32dbdd1fc5aa2042ff35e0
parenta855174878f06d197ddfde5cbe1e69a1d4a2df27
lib: bitmap: change parameter of bitmap_*_region to unsigned

Changing the pos parameter of __reg_op to unsigned allows the compiler
to generate slightly smaller and simpler code.  Also update its callers
bitmap_*_region to receive and pass unsigned int.  The return types of
bitmap_find_free_region and bitmap_allocate_region are still int to
allow a negative error code to be returned.  An int is certainly capable
of representing any realistic return value.

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/bitmap.h
lib/bitmap.c