From 298538142312f994b982b266f24f93405580ec5b Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Tue, 21 Apr 2015 14:03:31 -0700 Subject: [PATCH] datapath: Remove linux/compat/include/linux/log2.h. No longer need this compat file, we can use the upstream version of the function. Signed-off-by: Alex Wang Acked-by: Jesse Gross --- acinclude.m4 | 12 ------------ datapath/linux/Modules.mk | 1 - datapath/linux/compat/include/linux/log2.h | 17 ----------------- 3 files changed, 30 deletions(-) delete mode 100644 datapath/linux/compat/include/linux/log2.h diff --git a/acinclude.m4 b/acinclude.m4 index 718aa9321..070f1203c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -292,16 +292,6 @@ AC_DEFUN([OVS_DEFINE], [ echo '#define $1 1' >> datapath/linux/kcompat.h.new ]) -AC_DEFUN([OVS_CHECK_LOG2_H], [ - AC_MSG_CHECKING([for $KSRC/include/linux/log2.h]) - if test -e $KSRC/include/linux/log2.h; then - AC_MSG_RESULT([yes]) - OVS_DEFINE([HAVE_LOG2_H]) - else - AC_MSG_RESULT([no]) - fi -]) - dnl OVS_CHECK_LINUX_COMPAT dnl dnl Runs various Autoconf checks on the Linux 2.6 kernel source in @@ -442,8 +432,6 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/uapi/linux/netdevice.h], [NET_NAME_UNKNOWN], [OVS_DEFINE([HAVE_NET_NAME_UNKNOWN])]) - OVS_CHECK_LOG2_H - if cmp -s datapath/linux/kcompat.h.new \ datapath/linux/kcompat.h >/dev/null 2>&1; then rm datapath/linux/kcompat.h.new diff --git a/datapath/linux/Modules.mk b/datapath/linux/Modules.mk index 7d9710d7e..875ac0363 100644 --- a/datapath/linux/Modules.mk +++ b/datapath/linux/Modules.mk @@ -39,7 +39,6 @@ openvswitch_headers += \ linux/compat/include/linux/kconfig.h \ linux/compat/include/linux/kernel.h \ linux/compat/include/linux/list.h \ - linux/compat/include/linux/log2.h \ linux/compat/include/linux/mpls.h \ linux/compat/include/linux/net.h \ linux/compat/include/linux/random.h \ diff --git a/datapath/linux/compat/include/linux/log2.h b/datapath/linux/compat/include/linux/log2.h deleted file mode 100644 index 69abae5e8..000000000 --- a/datapath/linux/compat/include/linux/log2.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __LINUX_LOG2_WRAPPER -#define __LINUX_LOG2_WRAPPER - -#ifdef HAVE_LOG2_H -#include_next -#else -/* This is very stripped down because log2.h has far too many dependencies. */ - -extern __attribute__((const, noreturn)) -int ____ilog2_NaN(void); - -#define ilog2(n) ((n) == 4 ? 2 : \ - (n) == 8 ? 3 : \ - ____ilog2_NaN()) -#endif - -#endif -- 2.20.1