#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 */
#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;
#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
}
/* 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.