@@ -191,10 +191,10 @@ unsigned int __bitmap_weight(const unsigned long *bitmap, unsigned int bits)
unsigned int k, w = 0, lim = bits / BITS_PER_LONG;
for (k = 0; k < lim; k++)
- w += hweight_long(bitmap[k]);
+ w += hweightl(bitmap[k]);
if (bits % BITS_PER_LONG)
- w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));
+ w += hweightl(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));
return w;
}
@@ -431,11 +431,6 @@ static inline unsigned int generic_hweight64(uint64_t w)
return (w + (w >> 32)) & 0xFF;
}
-static inline unsigned int hweight_long(unsigned long w)
-{
- return sizeof(w) == 4 ? generic_hweight32(w) : generic_hweight64(w);
-}
-
/*
* rol32 - rotate a 32-bit value left
*