diff --git a/sys/ofed/include/linux/kernel.h b/sys/ofed/include/linux/kernel.h index 2f665c6663b..d07b3eb2cf0 100644 --- a/sys/ofed/include/linux/kernel.h +++ b/sys/ofed/include/linux/kernel.h @@ -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) diff --git a/sys/ofed/include/linux/log2.h b/sys/ofed/include/linux/log2.h index ffc1fdb64cf..77a29248658 100644 --- a/sys/ofed/include/linux/log2.h +++ b/sys/ofed/include/linux/log2.h @@ -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_ */