mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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:
parent
735c8d9528
commit
74db12ca99
2 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue