Lines Matching refs:nr_apqns
74 struct pkey_apqn *apqns, size_t *nr_apqns) in cca_apqns4key() argument
143 if (*nr_apqns < _nr_apqns) in cca_apqns4key()
148 *nr_apqns = _nr_apqns; in cca_apqns4key()
158 struct pkey_apqn *apqns, size_t *nr_apqns) in cca_apqns4type() argument
201 if (*nr_apqns < _nr_apqns) in cca_apqns4type()
206 *nr_apqns = _nr_apqns; in cca_apqns4type()
214 static int cca_key2protkey(const struct pkey_apqn *apqns, size_t nr_apqns, in cca_key2protkey() argument
254 if (!apqns || (nr_apqns == 1 && in cca_key2protkey()
256 nr_apqns = MAXAPQNSINLIST; in cca_key2protkey()
257 local_apqns = kmalloc_array(nr_apqns, sizeof(struct pkey_apqn), in cca_key2protkey()
261 rc = cca_apqns4key(key, keylen, 0, local_apqns, &nr_apqns); in cca_key2protkey()
267 for (rc = -ENODEV, i = 0; rc && i < nr_apqns; i++) { in cca_key2protkey()
303 static int cca_gen_key(const struct pkey_apqn *apqns, size_t nr_apqns, in cca_gen_key() argument
341 if (!apqns || (nr_apqns == 1 && in cca_gen_key()
343 nr_apqns = MAXAPQNSINLIST; in cca_gen_key()
344 local_apqns = kmalloc_array(nr_apqns, sizeof(struct pkey_apqn), in cca_gen_key()
349 local_apqns, &nr_apqns); in cca_gen_key()
355 for (rc = -ENODEV, i = 0; rc && i < nr_apqns; i++) { in cca_gen_key()
383 static int cca_clr2key(const struct pkey_apqn *apqns, size_t nr_apqns, in cca_clr2key() argument
427 if (!apqns || (nr_apqns == 1 && in cca_clr2key()
429 nr_apqns = MAXAPQNSINLIST; in cca_clr2key()
430 local_apqns = kmalloc_array(nr_apqns, sizeof(struct pkey_apqn), in cca_clr2key()
435 local_apqns, &nr_apqns); in cca_clr2key()
441 for (rc = -ENODEV, i = 0; rc && i < nr_apqns; i++) { in cca_clr2key()
465 u32 nr_apqns, *apqns = NULL; in cca_verifykey() local
482 rc = cca_findcard2(&apqns, &nr_apqns, *card, *dom, in cca_verifykey()
488 rc = cca_findcard2(&apqns, &nr_apqns, *card, *dom, in cca_verifykey()
515 rc = cca_findcard2(&apqns, &nr_apqns, *card, *dom, in cca_verifykey()
521 rc = cca_findcard2(&apqns, &nr_apqns, *card, *dom, in cca_verifykey()
552 size_t nr_apqns, in cca_slowpath_key2protkey() argument