From 2460cbb4a666f217ec32dd595aa9f38ce0497fe5 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Sat, 17 Feb 2018 21:40:19 +0000 Subject: [PATCH] Implement BUILD_BUG_ON_INVALID() function macro in the LinuxKPI. MFC after: 1 week Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/include/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index c2641320871..50533308757 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -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 { \