This change is only for consistency with the changes to the other bitmap_* functions; it doesn't change the size of the generated code: inside BITS_TO_LONGS there is a sizeof(long), which causes bits to be interpreted as unsigned anyway.
Unified · Split
| @@ -99,13 +99,13 @@ extern void __bitmap_shift_right(unsigned long *dst, · 98 unmodified lines | ||
| 99 | 99 | extern void __bitmap_shift_left(unsigned long *dst, |
| 100 | 100 | const unsigned long *src, int shift, int bits); |
| 101 | 101 | extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, |
| 102 | − const unsigned long *bitmap2, int bits); | |
| 102 | + const unsigned long *bitmap2, unsigned int nbits); | |
| 103 | 103 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
| 104 | − const unsigned long *bitmap2, int bits); | |
| 104 | + const unsigned long *bitmap2, unsigned int nbits); | |
| 105 | 105 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, |
| 106 | − const unsigned long *bitmap2, int bits); | |
| 106 | + const unsigned long *bitmap2, unsigned int nbits); | |
| 107 | 107 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
| 108 | − const unsigned long *bitmap2, int bits); | |
| 108 | + const unsigned long *bitmap2, unsigned int nbits); | |
| 109 | 109 | extern int __bitmap_intersects(const unsigned long *bitmap1, |
| 110 | 110 | const unsigned long *bitmap2, int bits); |
| 111 | 111 | extern int __bitmap_subset(const unsigned long *bitmap1, |
| @@ -188,7 +188,7 @@ static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, · 76 unmodified lines | ||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, |
| 191 | − const unsigned long *src2, int nbits) | |
| 191 | + const unsigned long *src2, unsigned int nbits) | |
| 192 | 192 | { |
| 193 | 193 | if (small_const_nbits(nbits)) |
| 194 | 194 | return (*dst = *src1 & *src2) != 0; |
| @@ -196,7 +196,7 @@ static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, · 1 unmodified line | ||
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, |
| 199 | − const unsigned long *src2, int nbits) | |
| 199 | + const unsigned long *src2, unsigned int nbits) | |
| 200 | 200 | { |
| 201 | 201 | if (small_const_nbits(nbits)) |
| 202 | 202 | *dst = *src1 | *src2; |
| @@ -205,7 +205,7 @@ static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, · 2 unmodified lines | ||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, |
| 208 | − const unsigned long *src2, int nbits) | |
| 208 | + const unsigned long *src2, unsigned int nbits) | |
| 209 | 209 | { |
| 210 | 210 | if (small_const_nbits(nbits)) |
| 211 | 211 | *dst = *src1 ^ *src2; |
| @@ -214,7 +214,7 @@ static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, · 2 unmodified lines | ||
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, |
| 217 | − const unsigned long *src2, int nbits) | |
| 217 | + const unsigned long *src2, unsigned int nbits) | |
| 218 | 218 | { |
| 219 | 219 | if (small_const_nbits(nbits)) |
| 220 | 220 | return (*dst = *src1 & ~(*src2)) != 0; |
| @@ -182,10 +182,10 @@ void __bitmap_shift_left(unsigned long *dst, · 181 unmodified lines | ||
| 182 | 182 | EXPORT_SYMBOL(__bitmap_shift_left); |
| 183 | 183 | |
| 184 | 184 | int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, |
| 185 | − const unsigned long *bitmap2, int bits) | |
| 185 | + const unsigned long *bitmap2, unsigned int bits) | |
| 186 | 186 | { |
| 187 | − int k; | |
| 188 | − int nr = BITS_TO_LONGS(bits); | |
| 187 | + unsigned int k; | |
| 188 | + unsigned int nr = BITS_TO_LONGS(bits); | |
| 189 | 189 | unsigned long result = 0; |
| 190 | 190 | |
| 191 | 191 | for (k = 0; k < nr; k++) |
| @@ -195,10 +195,10 @@ int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, · 3 unmodified lines | ||
| 195 | 195 | EXPORT_SYMBOL(__bitmap_and); |
| 196 | 196 | |
| 197 | 197 | void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
| 198 | − const unsigned long *bitmap2, int bits) | |
| 198 | + const unsigned long *bitmap2, unsigned int bits) | |
| 199 | 199 | { |
| 200 | − int k; | |
| 201 | − int nr = BITS_TO_LONGS(bits); | |
| 200 | + unsigned int k; | |
| 201 | + unsigned int nr = BITS_TO_LONGS(bits); | |
| 202 | 202 | |
| 203 | 203 | for (k = 0; k < nr; k++) |
| 204 | 204 | dst[k] = bitmap1[k] | bitmap2[k]; |
| @@ -206,10 +206,10 @@ void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, · 1 unmodified line | ||
| 206 | 206 | EXPORT_SYMBOL(__bitmap_or); |
| 207 | 207 | |
| 208 | 208 | void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, |
| 209 | − const unsigned long *bitmap2, int bits) | |
| 209 | + const unsigned long *bitmap2, unsigned int bits) | |
| 210 | 210 | { |
| 211 | − int k; | |
| 212 | − int nr = BITS_TO_LONGS(bits); | |
| 211 | + unsigned int k; | |
| 212 | + unsigned int nr = BITS_TO_LONGS(bits); | |
| 213 | 213 | |
| 214 | 214 | for (k = 0; k < nr; k++) |
| 215 | 215 | dst[k] = bitmap1[k] ^ bitmap2[k]; |
| @@ -217,10 +217,10 @@ void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, · 1 unmodified line | ||
| 217 | 217 | EXPORT_SYMBOL(__bitmap_xor); |
| 218 | 218 | |
| 219 | 219 | int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
| 220 | − const unsigned long *bitmap2, int bits) | |
| 220 | + const unsigned long *bitmap2, unsigned int bits) | |
| 221 | 221 | { |
| 222 | − int k; | |
| 223 | − int nr = BITS_TO_LONGS(bits); | |
| 222 | + unsigned int k; | |
| 223 | + unsigned int nr = BITS_TO_LONGS(bits); | |
| 224 | 224 | unsigned long result = 0; |
| 225 | 225 | |
| 226 | 226 | for (k = 0; k < nr; k++) |