diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-11 23:49:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-12 14:35:30 -0400 |
commit | cffaa9cb922472936b269017afdd3f147cb6f380 (patch) | |
tree | 4107259441940267b4c15cfdf4d5c1b2cd6c406a /lib | |
parent | eca849333017cab1cd02c8fc9187962fa629b27d (diff) |
rhashtable: Remove key length argument to key_hashfn
key_hashfn has only one caller and it doesn't really need to supply
the key length as an extra parameter.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rhashtable.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 03fdaf869c4d..838cccc4ef7e 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c | |||
@@ -81,9 +81,10 @@ static u32 obj_raw_hashfn(struct rhashtable *ht, | |||
81 | } | 81 | } |
82 | 82 | ||
83 | static u32 key_hashfn(struct rhashtable *ht, const struct bucket_table *tbl, | 83 | static u32 key_hashfn(struct rhashtable *ht, const struct bucket_table *tbl, |
84 | const void *key, u32 len) | 84 | const void *key) |
85 | { | 85 | { |
86 | return rht_bucket_index(tbl, ht->p.hashfn(key, len, tbl->hash_rnd) >> | 86 | return rht_bucket_index(tbl, ht->p.hashfn(key, ht->p.key_len, |
87 | tbl->hash_rnd) >> | ||
87 | HASH_RESERVED_SPACE); | 88 | HASH_RESERVED_SPACE); |
88 | } | 89 | } |
89 | 90 | ||
@@ -619,7 +620,7 @@ void *rhashtable_lookup_compare(struct rhashtable *ht, const void *key, | |||
619 | rcu_read_lock(); | 620 | rcu_read_lock(); |
620 | 621 | ||
621 | tbl = rht_dereference_rcu(ht->tbl, ht); | 622 | tbl = rht_dereference_rcu(ht->tbl, ht); |
622 | hash = key_hashfn(ht, tbl, key, ht->p.key_len); | 623 | hash = key_hashfn(ht, tbl, key); |
623 | restart: | 624 | restart: |
624 | rht_for_each_rcu(he, tbl, hash) { | 625 | rht_for_each_rcu(he, tbl, hash) { |
625 | if (!compare(rht_obj(ht, he), arg)) | 626 | if (!compare(rht_obj(ht, he), arg)) |