datapath: Remove linux/compat/include/linux/log2.h.
authorAlex Wang <alexw@nicira.com>
Tue, 21 Apr 2015 21:03:31 +0000 (14:03 -0700)
committerAlex Wang <alexw@nicira.com>
Sun, 26 Apr 2015 16:32:41 +0000 (09:32 -0700)
No longer need this compat file, we can use the upstream version
of the function.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
acinclude.m4
datapath/linux/Modules.mk
datapath/linux/compat/include/linux/log2.h [deleted file]

index 718aa93..070f120 100644 (file)
@@ -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
index 7d9710d..875ac03 100644 (file)
@@ -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 (file)
index 69abae5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __LINUX_LOG2_WRAPPER
-#define __LINUX_LOG2_WRAPPER
-
-#ifdef HAVE_LOG2_H
-#include_next <linux/log2.h>
-#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