From: Jesse Gross Date: Wed, 6 Mar 2013 08:10:01 +0000 (-0800) Subject: datapath: Fix circular dependency between bug.h and kernel.h. X-Git-Tag: v1.9.3~38 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=39b63da939c662c151ea678f3f3ca491f64cbfeb datapath: Fix circular dependency between bug.h and kernel.h. 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 Signed-off-by: Jesse Gross Conflicts: datapath/linux/Modules.mk --- diff --git a/datapath/linux/Modules.mk b/datapath/linux/Modules.mk index 5c55f1d9d..5ec731711 100644 --- a/datapath/linux/Modules.mk +++ b/datapath/linux/Modules.mk @@ -13,7 +13,6 @@ openvswitch_sources += \ 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 \ diff --git a/datapath/linux/compat/include/linux/bug.h b/datapath/linux/compat/include/linux/bug.h deleted file mode 100644 index d24e68e37..000000000 --- a/datapath/linux/compat/include/linux/bug.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __BUG_H_WRAPPER -#define __BUG_H_WRAPPER 1 - -#include_next - -#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 diff --git a/datapath/linux/compat/include/linux/kernel.h b/datapath/linux/compat/include/linux/kernel.h index 069839bdb..2fa5cc811 100644 --- a/datapath/linux/compat/include/linux/kernel.h +++ b/datapath/linux/compat/include/linux/kernel.h @@ -7,10 +7,6 @@ #endif #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0) -/* BUILD_BUG_ON_NOT_POWER_OF_2 definition */ -#include -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) #undef pr_emerg