Linux 6.9-rc1
[linux-2.6-microblaze.git] / tools / lib / bitmap.c
index 354f8cd..c3e4871 100644 (file)
@@ -5,9 +5,9 @@
  */
 #include <linux/bitmap.h>
 
-int __bitmap_weight(const unsigned long *bitmap, int bits)
+unsigned int __bitmap_weight(const unsigned long *bitmap, int bits)
 {
-       int k, w = 0, lim = bits/BITS_PER_LONG;
+       unsigned int k, w = 0, lim = bits/BITS_PER_LONG;
 
        for (k = 0; k < lim; k++)
                w += hweight_long(bitmap[k]);
@@ -57,7 +57,7 @@ size_t bitmap_scnprintf(unsigned long *bitmap, unsigned int nbits,
        return ret;
 }
 
-int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
+bool __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
                 const unsigned long *bitmap2, unsigned int bits)
 {
        unsigned int k;