This #ifdef-ary isn't necessary, and the logic can live in a plain if()
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
static inline unsigned int generic_hweight64(uint64_t w)
{
-#if BITS_PER_LONG < 64
- return generic_hweight32((unsigned int)(w >> 32)) +
- generic_hweight32((unsigned int)w);
-#else
+ if ( BITS_PER_LONG < 64 )
+ return generic_hweight32(w >> 32) + generic_hweight32(w);
+
w -= (w >> 1) & 0x5555555555555555ul;
w = (w & 0x3333333333333333ul) + ((w >> 2) & 0x3333333333333333ul);
w = (w + (w >> 4)) & 0x0f0f0f0f0f0f0f0ful;
w += w >> 16;
return (w + (w >> 32)) & 0xFF;
-#endif
}
static inline unsigned long hweight_long(unsigned long w)