Whamcloud - gitweb
LU-3963 libcfs: remove cfs_hash_long
[fs/lustre-release.git] / libcfs / include / libcfs / libcfs_hash.h
index e7d2dc8..444053d 100644 (file)
@@ -65,8 +65,6 @@
 
 #if (defined __linux__ && defined __KERNEL__)
 #include <linux/hash.h>
-
-#define cfs_hash_long(val, bits)    hash_long(val, bits)
 #else
 /* Fast hashing routine for a long.
    (C) 2002 William Lee Irwin III, IBM */
@@ -81,7 +79,7 @@
 #error Define CFS_GOLDEN_RATIO_PRIME for your wordsize.
 #endif
 
-static inline unsigned long cfs_hash_long(unsigned long val, unsigned int bits)
+static inline unsigned long hash_long(unsigned long val, unsigned int bits)
 {
        unsigned long hash = val;
 
@@ -111,7 +109,7 @@ static inline unsigned long cfs_hash_long(unsigned long val, unsigned int bits)
 #if 0
 static inline unsigned long hash_ptr(void *ptr, unsigned int bits)
 {
-       return cfs_hash_long((unsigned long)ptr, bits);
+       return hash_long((unsigned long)ptr, bits);
 }
 #endif
 
@@ -840,8 +838,13 @@ static inline void __cfs_hash_set_theta(cfs_hash_t *hs, int min, int max)
 }
 
 /* Generic debug formatting routines mainly for proc handler */
+#ifndef HAVE_ONLY_PROCFS_SEQ
 int cfs_hash_debug_header(char *str, int size);
 int cfs_hash_debug_str(cfs_hash_t *hs, char *str, int size);
+#endif
+struct seq_file;
+int cfs_hash_debug_header_seq(struct seq_file *m);
+int cfs_hash_debug_str_seq(cfs_hash_t *hs, struct seq_file *m);
 
 /*
  * Generic djb2 hash algorithm for character arrays.