diff options
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r-- | include/linux/bitops.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 2fe736e9..62a3f404 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -137,6 +137,11 @@ static inline unsigned long hweight64(u64 w) __builtin_popcount(w >> 32); } +static inline unsigned long hweight32(u32 w) +{ + return __builtin_popcount(w); +} + static inline unsigned long hweight8(unsigned long w) { return __builtin_popcountl(w); |