summaryrefslogtreecommitdiff
path: root/include/linux/bitops.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-05-08 02:28:15 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-05-08 06:57:17 -0800
commit63065c01285601afbe2457e92729efc11581e37d (patch)
tree8e37af7dcd60f0a260536064f4c6ec0c5dc24a06 /include/linux/bitops.h
parente57a624feb82e6d1bb8bd77c0f185939b1367b19 (diff)
Update bcachefs sources to 9ceb982d77 bcachefs: Store bucket gens in a btree
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r--include/linux/bitops.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 47fffb79..239574c1 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -112,6 +112,11 @@ static inline unsigned long hweight_long(unsigned long w)
return __builtin_popcountl(w);
}
+static inline unsigned long hweight8(unsigned long w)
+{
+ return __builtin_popcountl(w);
+}
+
/**
* rol64 - rotate a 64-bit value left
* @word: value to rotate