Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
[cascardo/linux.git] / lib / test_rhashtable.c
index f6ce291..2bc403d 100644 (file)
@@ -80,7 +80,7 @@ static void test_bucket_stats(struct rhashtable *ht, bool quiet)
                rcu_cnt = cnt = 0;
 
                if (!quiet)
-                       pr_info(" [%#4x/%zu]", i, tbl->size);
+                       pr_info(" [%#4x/%u]", i, tbl->size);
 
                rht_for_each_entry_rcu(obj, pos, tbl, i, node) {
                        cnt++;
@@ -201,9 +201,8 @@ static int __init test_rht_init(void)
                .key_offset = offsetof(struct test_obj, value),
                .key_len = sizeof(int),
                .hashfn = jhash,
+               .max_size = 2, /* we expand/shrink manually here */
                .nulls_base = (3U << RHT_BASE_SHIFT),
-               .grow_decision = rht_grow_above_75,
-               .shrink_decision = rht_shrink_below_30,
        };
        int err;
 
@@ -223,6 +222,11 @@ static int __init test_rht_init(void)
        return err;
 }
 
+static void __exit test_rht_exit(void)
+{
+}
+
 module_init(test_rht_init);
+module_exit(test_rht_exit);
 
 MODULE_LICENSE("GPL v2");