Implement BUILD_BUG_ON_INVALID() function macro in the LinuxKPI.

MFC after:	1 week
Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-02-17 21:40:19 +00:00
parent 03f8ddedf0
commit 2460cbb4a6

View file

@ -89,6 +89,7 @@
#define BUILD_BUG_ON(x) CTASSERT(!(x))
#define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x)
#define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x))
#define BUILD_BUG_ON_INVALID(expr) while (0) { (void)(expr); }
#define BUG() panic("BUG at %s:%d", __FILE__, __LINE__)
#define BUG_ON(cond) do { \