crypto: api - Remove frontend argument from extsize/init_tfm

As the extsize and init_tfm functions belong to the frontend the
frontend argument is superfluous.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu 2009-07-13 20:46:25 +08:00
Родитель 6b1679f4a0
Коммит 2ca33da1de
4 изменённых файлов: 8 добавлений и 14 удалений

Просмотреть файл

@ -457,7 +457,7 @@ void *crypto_create_tfm(struct crypto_alg *alg,
int err = -ENOMEM; int err = -ENOMEM;
tfmsize = frontend->tfmsize; tfmsize = frontend->tfmsize;
total = tfmsize + sizeof(*tfm) + frontend->extsize(alg, frontend); total = tfmsize + sizeof(*tfm) + frontend->extsize(alg);
mem = kzalloc(total, GFP_KERNEL); mem = kzalloc(total, GFP_KERNEL);
if (mem == NULL) if (mem == NULL)
@ -466,7 +466,7 @@ void *crypto_create_tfm(struct crypto_alg *alg,
tfm = (struct crypto_tfm *)(mem + tfmsize); tfm = (struct crypto_tfm *)(mem + tfmsize);
tfm->__crt_alg = alg; tfm->__crt_alg = alg;
err = frontend->init_tfm(tfm, frontend); err = frontend->init_tfm(tfm);
if (err) if (err)
goto out_free_tfm; goto out_free_tfm;

Просмотреть файл

@ -36,14 +36,12 @@ static int crypto_pcomp_init(struct crypto_tfm *tfm, u32 type, u32 mask)
return 0; return 0;
} }
static unsigned int crypto_pcomp_extsize(struct crypto_alg *alg, static unsigned int crypto_pcomp_extsize(struct crypto_alg *alg)
const struct crypto_type *frontend)
{ {
return alg->cra_ctxsize; return alg->cra_ctxsize;
} }
static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm, static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm)
const struct crypto_type *frontend)
{ {
return 0; return 0;
} }

Просмотреть файл

@ -448,8 +448,7 @@ static unsigned int crypto_shash_ctxsize(struct crypto_alg *alg, u32 type,
return 0; return 0;
} }
static int crypto_shash_init_tfm(struct crypto_tfm *tfm, static int crypto_shash_init_tfm(struct crypto_tfm *tfm)
const struct crypto_type *frontend)
{ {
struct crypto_shash *hash = __crypto_shash_cast(tfm); struct crypto_shash *hash = __crypto_shash_cast(tfm);
@ -457,8 +456,7 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm,
return 0; return 0;
} }
static unsigned int crypto_shash_extsize(struct crypto_alg *alg, static unsigned int crypto_shash_extsize(struct crypto_alg *alg)
const struct crypto_type *frontend)
{ {
return alg->cra_ctxsize; return alg->cra_ctxsize;
} }

Просмотреть файл

@ -22,11 +22,9 @@ struct seq_file;
struct crypto_type { struct crypto_type {
unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask);
unsigned int (*extsize)(struct crypto_alg *alg, unsigned int (*extsize)(struct crypto_alg *alg);
const struct crypto_type *frontend);
int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
int (*init_tfm)(struct crypto_tfm *tfm, int (*init_tfm)(struct crypto_tfm *tfm);
const struct crypto_type *frontend);
void (*show)(struct seq_file *m, struct crypto_alg *alg); void (*show)(struct seq_file *m, struct crypto_alg *alg);
struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask); struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask);