In Linux 3.4 the definition for BUILD_BUG_ON_NOT_POWER_OF_2 was
moved from kernel.h to bug.h. On various kernels these header
files include each other in various orders (often through a
long chain of other header files), which can create circular
dependency issues. Since we not longer need this definition,
this simply removes the backport.
Reported-by: Palo Andi <andi@dis.uniroma1.it>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Conflicts:
datapath/linux/Modules.mk
linux/compat/time.c \
linux/compat/workqueue.c
openvswitch_headers += \
- linux/compat/include/linux/bug.h \
linux/compat/include/linux/compiler.h \
linux/compat/include/linux/compiler-gcc.h \
linux/compat/include/linux/cpumask.h \
+++ /dev/null
-#ifndef __BUG_H_WRAPPER
-#define __BUG_H_WRAPPER 1
-
-#include_next <linux/bug.h>
-
-#ifndef BUILD_BUG_ON_NOT_POWER_OF_2
-/* Force a compilation error if a constant expression is not a power of 2 */
-#define BUILD_BUG_ON_NOT_POWER_OF_2(n) \
- BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
-#endif
-
-#endif
#endif
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
-/* BUILD_BUG_ON_NOT_POWER_OF_2 definition */
-#include <linux/bug.h>
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
#undef pr_emerg