Lines Matching defs:enr
221 static struct hlist_head *lc_hash_slot(struct lru_cache *lc, unsigned int enr)
223 return lc->lc_slot + (enr % lc->nr_elements);
230 * @enr: element number
236 struct lc_element *lc_find(struct lru_cache *lc, unsigned int enr)
243 hlist_for_each_entry(e, n, lc_hash_slot(lc, enr), colision) {
244 if (e->lc_number == enr)
275 * sets @e->enr to %LC_FREE.
315 * @enr: the label to look up
349 struct lc_element *lc_get(struct lru_cache *lc, unsigned int enr)
359 e = lc_find(lc, enr);
395 lc->new_number = enr;
405 struct lc_element *lc_try_get(struct lru_cache *lc, unsigned int enr)
415 e = lc_find(lc, enr);
499 * @enr: the label to set
504 void lc_set(struct lru_cache *lc, unsigned int enr, int index)
512 e->lc_number = enr;
515 hlist_add_head(&e->colision, lc_hash_slot(lc, enr));