Lines Matching refs:key_id
18 static int key_id_index(unsigned int key_id) in key_id_index() argument
20 if (key_id >= NUM_KEYS) { in key_id_index()
24 return key_id; in key_id_index()
48 unsigned int key_id) in world_obj_get() argument
54 key.id = key_id; in world_obj_get()
57 pr_err("Key %u: Failed to get object.\n", key_id); in world_obj_get()
60 if (!world->key_refs[key_id_index(key_id)]) { in world_obj_get()
61 world->objagg_objs[key_id_index(key_id)] = objagg_obj; in world_obj_get()
62 } else if (world->objagg_objs[key_id_index(key_id)] != objagg_obj) { in world_obj_get()
64 key_id); in world_obj_get()
68 world->key_refs[key_id_index(key_id)]++; in world_obj_get()
77 unsigned int key_id) in world_obj_put() argument
81 if (!world->key_refs[key_id_index(key_id)]) in world_obj_put()
83 objagg_obj = world->objagg_objs[key_id_index(key_id)]; in world_obj_put()
85 world->key_refs[key_id_index(key_id)]--; in world_obj_put()
152 unsigned int key_id, bool should_create_root) in test_nodelta_obj_get() argument
163 objagg_obj = world_obj_get(world, objagg, key_id); in test_nodelta_obj_get()
165 pr_err("Key %u: Failed to get object.\n", key_id); in test_nodelta_obj_get()
170 pr_err("Key %u: Root was not created\n", key_id); in test_nodelta_obj_get()
177 key_id); in test_nodelta_obj_get()
183 if (root->key.id != key_id) { in test_nodelta_obj_get()
184 pr_err("Key %u: Root has unexpected key id\n", key_id); in test_nodelta_obj_get()
191 key_id); in test_nodelta_obj_get()
205 unsigned int key_id, bool should_destroy_root) in test_nodelta_obj_put() argument
209 world_obj_put(world, objagg, key_id); in test_nodelta_obj_put()
213 pr_err("Key %u: Root was not destroyed\n", key_id); in test_nodelta_obj_put()
219 key_id); in test_nodelta_obj_put()
403 unsigned int key_id; member
412 unsigned int key_id; member
425 #define ROOT(key_id, user_count, delta_user_count) \ argument
426 {{user_count, delta_user_count}, true, key_id}
428 #define DELTA(key_id, user_count) \ argument
429 {{user_count, user_count}, false, key_id}
566 unsigned int key_id = action_item->key_id; in check_expect() local
572 key_id); in check_expect()
581 key_id); in check_expect()
590 key_id); in check_expect()
600 key_id); in check_expect()
609 key_id); in check_expect()
618 key_id); in check_expect()
630 unsigned int key_id; in obj_to_key_id() local
633 key_id = root_key->id; in obj_to_key_id()
636 key_id += delta->key_id_diff; in obj_to_key_id()
637 return key_id; in obj_to_key_id()
671 expect_stats_info->key_id) { in check_expect_stats_key_id()
764 unsigned int key_id = action_item->key_id; in test_delta_action_item() local
775 objagg_obj = world_obj_get(world, objagg, key_id); in test_delta_action_item()
780 world_obj_put(world, objagg, key_id); in test_delta_action_item()
793 pr_err("Key %u: Stats: %s\n", action_item->key_id, errmsg); in test_delta_action_item()