Commit e72b48c5 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu

crypto: geniv - remove unneeded arguments from aead_geniv_alloc()

The type and mask arguments to aead_geniv_alloc() are always 0, so
remove them.
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d7866e50
...@@ -115,7 +115,7 @@ static int echainiv_aead_create(struct crypto_template *tmpl, ...@@ -115,7 +115,7 @@ static int echainiv_aead_create(struct crypto_template *tmpl,
struct aead_instance *inst; struct aead_instance *inst;
int err; int err;
inst = aead_geniv_alloc(tmpl, tb, 0, 0); inst = aead_geniv_alloc(tmpl, tb);
if (IS_ERR(inst)) if (IS_ERR(inst))
return PTR_ERR(inst); return PTR_ERR(inst);
......
...@@ -39,7 +39,7 @@ static void aead_geniv_free(struct aead_instance *inst) ...@@ -39,7 +39,7 @@ static void aead_geniv_free(struct aead_instance *inst)
} }
struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
struct rtattr **tb, u32 type, u32 mask) struct rtattr **tb)
{ {
struct crypto_aead_spawn *spawn; struct crypto_aead_spawn *spawn;
struct crypto_attr_type *algt; struct crypto_attr_type *algt;
...@@ -47,6 +47,7 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, ...@@ -47,6 +47,7 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
struct aead_alg *alg; struct aead_alg *alg;
unsigned int ivsize; unsigned int ivsize;
unsigned int maxauthsize; unsigned int maxauthsize;
u32 mask;
int err; int err;
algt = crypto_get_attr_type(tb); algt = crypto_get_attr_type(tb);
...@@ -63,10 +64,10 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, ...@@ -63,10 +64,10 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
spawn = aead_instance_ctx(inst); spawn = aead_instance_ctx(inst);
/* Ignore async algorithms if necessary. */ /* Ignore async algorithms if necessary. */
mask |= crypto_requires_sync(algt->type, algt->mask); mask = crypto_requires_sync(algt->type, algt->mask);
err = crypto_grab_aead(spawn, aead_crypto_instance(inst), err = crypto_grab_aead(spawn, aead_crypto_instance(inst),
crypto_attr_alg_name(tb[1]), type, mask); crypto_attr_alg_name(tb[1]), 0, mask);
if (err) if (err)
goto err_free_inst; goto err_free_inst;
......
...@@ -138,7 +138,7 @@ static int seqiv_aead_create(struct crypto_template *tmpl, struct rtattr **tb) ...@@ -138,7 +138,7 @@ static int seqiv_aead_create(struct crypto_template *tmpl, struct rtattr **tb)
struct aead_instance *inst; struct aead_instance *inst;
int err; int err;
inst = aead_geniv_alloc(tmpl, tb, 0, 0); inst = aead_geniv_alloc(tmpl, tb);
if (IS_ERR(inst)) if (IS_ERR(inst))
return PTR_ERR(inst); return PTR_ERR(inst);
......
...@@ -20,7 +20,7 @@ struct aead_geniv_ctx { ...@@ -20,7 +20,7 @@ struct aead_geniv_ctx {
}; };
struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
struct rtattr **tb, u32 type, u32 mask); struct rtattr **tb);
int aead_init_geniv(struct crypto_aead *tfm); int aead_init_geniv(struct crypto_aead *tfm);
void aead_exit_geniv(struct crypto_aead *tfm); void aead_exit_geniv(struct crypto_aead *tfm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment