[Ocfs2-commits] smushran commits r3104 - in branches/ocfs2-1.2.9: . fs/ocfs2 kapi-compat/include

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Nov 11 16:35:45 PST 2008


Author: smushran
Date: 2008-11-11 16:35:45 -0800 (Tue, 11 Nov 2008)
New Revision: 3104

Added:
   branches/ocfs2-1.2.9/kapi-compat/include/le32_add_cpu.h
Modified:
   branches/ocfs2-1.2.9/Makefile
   branches/ocfs2-1.2.9/configure.in
   branches/ocfs2-1.2.9/fs/ocfs2/endian.h
Log:
ocfs2: le32_add_cpu() moved to kapi-compat

le32_add_cpu() moved to kapi-compat to allow building with kernels
that already define this function.

Signed-off-by: jlbec

Modified: branches/ocfs2-1.2.9/Makefile
===================================================================
--- branches/ocfs2-1.2.9/Makefile	2008-11-12 00:35:06 UTC (rev 3103)
+++ branches/ocfs2-1.2.9/Makefile	2008-11-12 00:35:45 UTC (rev 3104)
@@ -19,7 +19,8 @@
 	kapi-compat/include/kzalloc.h			\
 	kapi-compat/include/simple_pin_fs.h		\
 	kapi-compat/include/reboot.h			\
-	kapi-compat/include/le16_add_cpu.h
+	kapi-compat/include/le16_add_cpu.h		\
+	kapi-compat/include/le32_add_cpu.h
 
 PATCH_FILES = \
 	patches/export_generic_drop_inode.patch

Modified: branches/ocfs2-1.2.9/configure.in
===================================================================
--- branches/ocfs2-1.2.9/configure.in	2008-11-12 00:35:06 UTC (rev 3103)
+++ branches/ocfs2-1.2.9/configure.in	2008-11-12 00:35:45 UTC (rev 3104)
@@ -289,6 +289,11 @@
   , le16_add_cpu_compat_header="le16_add_cpu.h", [^static inline void le16_add_cpu(])
 KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $le16_add_cpu_compat_header"
 
+le32_add_cpu_compat_header=""
+OCFS2_CHECK_KERNEL([le32_add_cpu() in byteorder/generic.h], byteorder/generic.h,
+  , le32_add_cpu_compat_header="le32_add_cpu.h", [^static inline void le32_add_cpu(])
+KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $le32_add_cpu_compat_header"
+
 # using -include has two advantages:
 #  the source doesn't need to know to include compat headers
 #  the compat header file names don't go through the search path

Modified: branches/ocfs2-1.2.9/fs/ocfs2/endian.h
===================================================================
--- branches/ocfs2-1.2.9/fs/ocfs2/endian.h	2008-11-12 00:35:06 UTC (rev 3103)
+++ branches/ocfs2-1.2.9/fs/ocfs2/endian.h	2008-11-12 00:35:45 UTC (rev 3104)
@@ -22,11 +22,6 @@
 #ifndef OCFS2_ENDIAN_H
 #define OCFS2_ENDIAN_H
 
-static inline void le32_add_cpu(__le32 *var, u32 val)
-{
-	*var = cpu_to_le32(le32_to_cpu(*var) + val);
-}
-
 static inline void le32_and_cpu(__le32 *var, u32 val)
 {
 	*var = cpu_to_le32(le32_to_cpu(*var) & val);

Added: branches/ocfs2-1.2.9/kapi-compat/include/le32_add_cpu.h
===================================================================
--- branches/ocfs2-1.2.9/kapi-compat/include/le32_add_cpu.h	                        (rev 0)
+++ branches/ocfs2-1.2.9/kapi-compat/include/le32_add_cpu.h	2008-11-12 00:35:45 UTC (rev 3104)
@@ -0,0 +1,9 @@
+#ifndef LE32_ADD_CPU_H
+#define LE32_ADD_CPU_H
+
+static inline void le32_add_cpu(__le32 *var, u32 val)
+{
+	*var = cpu_to_le32(le32_to_cpu(*var) + val);
+}
+
+#endif




More information about the Ocfs2-commits mailing list