1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Macro fixes:

- Add missing "order_base_2()" macro.
- Fix BUILD_BUG_ON() macro.

MFC after:	1 month
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2015-02-23 12:54:46 +00:00
parent 735c8d9528
commit 74db12ca99
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279205
2 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,7 @@
#define KERN_INFO "<6>"
#define KERN_DEBUG "<7>"
#define BUILD_BUG_ON(x) CTASSERT(x)
#define BUILD_BUG_ON(x) CTASSERT(!(x))
#define BUG() panic("BUG")
#define BUG_ON(condition) do { if (condition) BUG(); } while(0)

View File

@ -167,4 +167,6 @@ int __ilog2_u64(u64 n)
__ilog2_u64(n) \
)
#define order_base_2(x) ilog2(roundup_pow_of_two(x))
#endif /* _LINUX_LOG2_H_ */