X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Finclude%2Flibcfs%2Flibcfs_hash.h;h=444053d691d54997e38f1557ef3020ab27050ba4;hb=ddea2d2f982276001562f169a3a3556a64cd58ce;hp=e7d2dc8d2e07932f6fec9ed7e7a07f1297e4f278;hpb=148a7fba3d289caf053db937c8a08f63528dada1;p=fs%2Flustre-release.git diff --git a/libcfs/include/libcfs/libcfs_hash.h b/libcfs/include/libcfs/libcfs_hash.h index e7d2dc8..444053d 100644 --- a/libcfs/include/libcfs/libcfs_hash.h +++ b/libcfs/include/libcfs/libcfs_hash.h @@ -65,8 +65,6 @@ #if (defined __linux__ && defined __KERNEL__) #include - -#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.