diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2018-10-30 15:05:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-31 08:54:12 -0700 |
commit | d9873969fa8725dc6a5a21ab788c057fd8719751 (patch) | |
tree | da3ecbdf0a9cb89976f612eca646463be8d9880c | |
parent | c8cebc553368209426f7279736db4f88f1853396 (diff) | |
download | linux-d9873969fa8725dc6a5a21ab788c057fd8719751.tar.bz2 |
linux/bitmap.h: fix type of nbits in bitmap_shift_right()
Most other bitmap API, including the OOL version __bitmap_shift_right,
take unsigned nbits. This was accidentally left out from 2fbad29917c98.
Link: http://lkml.kernel.org/r/20180818131623.8755-5-linux@rasmusvillemoes.dk
Fixes: 2fbad29917c98 ("lib: bitmap: change bitmap_shift_right to take unsigned parameters")
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reported-by: Yury Norov <ynorov@caviumnetworks.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/bitmap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 004cd42a3c4d..4032680e629d 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -391,7 +391,7 @@ static __always_inline void bitmap_clear(unsigned long *map, unsigned int start, } static inline void bitmap_shift_right(unsigned long *dst, const unsigned long *src, - unsigned int shift, int nbits) + unsigned int shift, unsigned int nbits) { if (small_const_nbits(nbits)) *dst = (*src & BITMAP_LAST_WORD_MASK(nbits)) >> shift; |