diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bitmap.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 202e4034fe26..1406d5453781 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
| @@ -185,33 +185,33 @@ extern int bitmap_print_to_pagebuf(bool list, char *buf, | |||
| 185 | #define small_const_nbits(nbits) \ | 185 | #define small_const_nbits(nbits) \ |
| 186 | (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG) | 186 | (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG) |
| 187 | 187 | ||
| 188 | static inline void bitmap_zero(unsigned long *dst, int nbits) | 188 | static inline void bitmap_zero(unsigned long *dst, unsigned int nbits) |
| 189 | { | 189 | { |
| 190 | if (small_const_nbits(nbits)) | 190 | if (small_const_nbits(nbits)) |
| 191 | *dst = 0UL; | 191 | *dst = 0UL; |
| 192 | else { | 192 | else { |
| 193 | int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); | 193 | unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); |
| 194 | memset(dst, 0, len); | 194 | memset(dst, 0, len); |
| 195 | } | 195 | } |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static inline void bitmap_fill(unsigned long *dst, int nbits) | 198 | static inline void bitmap_fill(unsigned long *dst, unsigned int nbits) |
| 199 | { | 199 | { |
| 200 | size_t nlongs = BITS_TO_LONGS(nbits); | 200 | unsigned int nlongs = BITS_TO_LONGS(nbits); |
| 201 | if (!small_const_nbits(nbits)) { | 201 | if (!small_const_nbits(nbits)) { |
| 202 | int len = (nlongs - 1) * sizeof(unsigned long); | 202 | unsigned int len = (nlongs - 1) * sizeof(unsigned long); |
| 203 | memset(dst, 0xff, len); | 203 | memset(dst, 0xff, len); |
| 204 | } | 204 | } |
| 205 | dst[nlongs - 1] = BITMAP_LAST_WORD_MASK(nbits); | 205 | dst[nlongs - 1] = BITMAP_LAST_WORD_MASK(nbits); |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, | 208 | static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, |
| 209 | int nbits) | 209 | unsigned int nbits) |
| 210 | { | 210 | { |
| 211 | if (small_const_nbits(nbits)) | 211 | if (small_const_nbits(nbits)) |
| 212 | *dst = *src; | 212 | *dst = *src; |
| 213 | else { | 213 | else { |
| 214 | int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); | 214 | unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); |
| 215 | memcpy(dst, src, len); | 215 | memcpy(dst, src, len); |
| 216 | } | 216 | } |
| 217 | } | 217 | } |
