diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2019-02-14 22:03:27 +0800 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-02-22 13:49:00 +0100 |
commit | 6c4128f658571b2dc7e01058ad09a8e947bc0159 (patch) | |
tree | 9f1bd71756ca9ea29e31babf0039817a9567eafe /lib | |
parent | 3692293163b8ba1f28bad0e4a7ddf4fa0a7fd34d (diff) | |
download | linux-stable-6c4128f658571b2dc7e01058ad09a8e947bc0159.tar.gz linux-stable-6c4128f658571b2dc7e01058ad09a8e947bc0159.tar.bz2 linux-stable-6c4128f658571b2dc7e01058ad09a8e947bc0159.zip |
rhashtable: Remove obsolete rhashtable_walk_init function
The rhashtable_walk_init function has been obsolete for more than
two years. This patch finally converts its last users over to
rhashtable_walk_enter and removes it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rhashtable.c | 2 | ||||
-rw-r--r-- | lib/test_rhashtable.c | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 852ffa5160f1..0a105d4af166 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -682,7 +682,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_enter); * rhashtable_walk_exit - Free an iterator * @iter: Hash table Iterator * - * This function frees resources allocated by rhashtable_walk_init. + * This function frees resources allocated by rhashtable_walk_enter. */ void rhashtable_walk_exit(struct rhashtable_iter *iter) { diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index 2c0c53a99734..3bd2e91bfc29 100644 --- a/lib/test_rhashtable.c +++ b/lib/test_rhashtable.c @@ -177,16 +177,11 @@ static int __init test_rht_lookup(struct rhashtable *ht, struct test_obj *array, static void test_bucket_stats(struct rhashtable *ht, unsigned int entries) { - unsigned int err, total = 0, chain_len = 0; + unsigned int total = 0, chain_len = 0; struct rhashtable_iter hti; struct rhash_head *pos; - err = rhashtable_walk_init(ht, &hti, GFP_KERNEL); - if (err) { - pr_warn("Test failed: allocation error"); - return; - } - + rhashtable_walk_enter(ht, &hti); rhashtable_walk_start(&hti); while ((pos = rhashtable_walk_next(&hti))) { |