Date: Mon, 23 Feb 2015 12:54:47 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279205 - head/sys/ofed/include/linux Message-ID: <201502231254.t1NCsl0V006927@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Feb 23 12:54:46 2015 New Revision: 279205 URL: https://svnweb.freebsd.org/changeset/base/279205 Log: Macro fixes: - Add missing "order_base_2()" macro. - Fix BUILD_BUG_ON() macro. MFC after: 1 month Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/kernel.h head/sys/ofed/include/linux/log2.h Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Mon Feb 23 09:40:59 2015 (r279204) +++ head/sys/ofed/include/linux/kernel.h Mon Feb 23 12:54:46 2015 (r279205) @@ -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) Modified: head/sys/ofed/include/linux/log2.h ============================================================================== --- head/sys/ofed/include/linux/log2.h Mon Feb 23 09:40:59 2015 (r279204) +++ head/sys/ofed/include/linux/log2.h Mon Feb 23 12:54:46 2015 (r279205) @@ -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_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502231254.t1NCsl0V006927>