diff --git a/include/linux/bitops.h b/include/linux/bitops.h index cee74a52b9eb..e1dee6c91ff5 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -49,7 +49,7 @@ static inline int get_bitmask_order(unsigned int count) static __always_inline unsigned long hweight_long(unsigned long w) { - return sizeof(w) == 4 ? hweight32(w) : hweight64(w); + return sizeof(w) == 4 ? hweight32(w) : hweight64((__u64)w); } /**