Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2018 21:40:19 +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: r329471 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201802172140.w1HLeJbD074275@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sat Feb 17 21:40:19 2018
New Revision: 329471
URL: https://svnweb.freebsd.org/changeset/base/329471

Log:
  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

Modified:
  head/sys/compat/linuxkpi/common/include/linux/kernel.h

Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/kernel.h	Sat Feb 17 21:25:19 2018	(r329470)
+++ head/sys/compat/linuxkpi/common/include/linux/kernel.h	Sat Feb 17 21:40:19 2018	(r329471)
@@ -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 {				\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802172140.w1HLeJbD074275>