[lustre-devel] [PATCH 25/40] lnet: libcfs: remove unused hash code
James Simmons <[email protected]> Sun, 9 Apr 2023 08:13:05 -0400
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Timothy Day <[email protected]> Two functions which hash then apply a mask are removed. WC-bug-id: https://jira.whamcloud.com/browse/LU-16518 Lustre-commit: 239e826876e5e2040 ("LU-16518 misc: use fixed hash code") Signed-off-by: Timothy Day <[email protected]> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49916 Reviewed-by: jsimmons <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Signed-off-by: James Simmons <[email protected]> --- include/linux/libcfs/libcfs_hash.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/include/linux/libcfs/libcfs_hash.h b/include/linux/libcfs/libcfs_hash.h index d3b4875..d60e002 100644 --- a/include/linux/libcfs/libcfs_hash.h +++ b/include/linux/libcfs/libcfs_hash.h @@ -829,24 +829,6 @@ static inline int __cfs_hash_theta(struct cfs_hash *hs) return (hash & mask); } -/* - * Generic u32 hash algorithm. - */ -static inline unsigned -cfs_hash_u32_hash(const u32 key, unsigned int mask) -{ - return ((key * CFS_GOLDEN_RATIO_PRIME_32) & mask); -} - -/* - * Generic u64 hash algorithm. - */ -static inline unsigned -cfs_hash_u64_hash(const u64 key, unsigned int mask) -{ - return ((unsigned int)(key * CFS_GOLDEN_RATIO_PRIME_64) & mask); -} - /** iterate over all buckets in @bds (array of struct cfs_hash_bd) */ #define cfs_hash_for_each_bd(bds, n, i) \ for (i = 0; i < n && (bds)[i].bd_bucket != NULL; i++) -- 1.8.3.1 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org