staging/lustre/libcfs: Fix build errors for !CONFIG_SMP
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 2 May 2014 16:28:33 +0000 (18:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 May 2014 23:38:08 +0000 (19:38 -0400)
When CONFIG_SMP=n:

drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h:58:31: fatal error: libcfs/libcfs_cpu.h: No such file or directory

drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c:78:1: error: redefinition of 'cfs_cpt_table_print'
drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h:109:1: note: previous definition of 'cfs_cpt_table_print' was here

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c

index 72c76ad96ce941d66f72f5458ef462e8abe29563..ccee5c3e4142dac9dad88ecfd2aa65ad38c95b85 100644 (file)
@@ -55,7 +55,7 @@
 
 #ifndef HAVE_LIBCFS_CPT
 /* Need this for cfs_cpt_table */
-#include <libcfs/libcfs_cpu.h>
+#include <linux/libcfs/libcfs_cpu.h>
 #endif
 
 #define CFS_PAGE_MASK             (~((__u64)PAGE_CACHE_SIZE-1))
index d985e83ba2c31cb944d6dfe4f73e5b3ab3317b4a..a1a7bf44cccfe7663fe0f686cae711cbf7d0e15b 100644 (file)
@@ -74,6 +74,7 @@ cfs_cpt_table_free(struct cfs_cpt_table *cptab)
 }
 EXPORT_SYMBOL(cfs_cpt_table_free);
 
+#ifdef CONFIG_SMP
 int
 cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len)
 {
@@ -87,6 +88,7 @@ cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len)
        return rc;
 }
 EXPORT_SYMBOL(cfs_cpt_table_print);
+#endif /* CONFIG_SMP */
 
 int
 cfs_cpt_number(struct cfs_cpt_table *cptab)