diff options
Diffstat (limited to 'lib/bitmap.c')
-rw-r--r-- | lib/bitmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index 2b67cd657692..488e6c3e5acc 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -333,9 +333,9 @@ bool __bitmap_subset(const unsigned long *bitmap1, } EXPORT_SYMBOL(__bitmap_subset); -unsigned long __bitmap_weight(const unsigned long *bitmap, unsigned int bits) +unsigned int __bitmap_weight(const unsigned long *bitmap, unsigned int bits) { - unsigned long k, w = 0, lim = bits/BITS_PER_LONG; + unsigned int k, lim = bits/BITS_PER_LONG, w = 0; for (k = 0; k < lim; k++) w += hweight_long(bitmap[k]); |