linux/bitmap.h: fix type of nbits in bitmap_shift_right()
authorRasmus Villemoes <[email protected]>
Tue, 30 Oct 2018 22:05:07 +0000 (15:05 -0700)
committerLinus Torvalds <[email protected]>
Wed, 31 Oct 2018 15:54:12 +0000 (08:54 -0700)
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/[email protected]
Fixes: 2fbad29917c98 ("lib: bitmap: change bitmap_shift_right to take unsigned parameters")
Signed-off-by: Rasmus Villemoes <[email protected]>
Reported-by: Yury Norov <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sudeep Holla <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/bitmap.h

index 004cd42a3c4d4fc723c4764d8d8ff6059dab193d..4032680e629d42c9e03af642f4853ed54638fd12 100644 (file)
@@ -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;