projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tools: sync small_const_nbits() macro with the kernel
[linux-block.git]
/
tools
/
include
/
asm-generic
/
bitsperlong.h
diff --git
a/tools/include/asm-generic/bitsperlong.h
b/tools/include/asm-generic/bitsperlong.h
index 8f2283052333e08f86ca62858ea7b4b173141575..2093d56ddd1169acd34300e76e35311bd0a0e48a 100644
(file)
--- a/
tools/include/asm-generic/bitsperlong.h
+++ b/
tools/include/asm-generic/bitsperlong.h
@@
-18,4
+18,7
@@
#define BITS_PER_LONG_LONG 64
#endif
+#define small_const_nbits(nbits) \
+ (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
+
#endif /* __ASM_GENERIC_BITS_PER_LONG */