aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/api.c4
-rw-r--r--crypto/pcompress.c6
-rw-r--r--crypto/shash.c6
-rw-r--r--include/crypto/algapi.h6
4 files changed, 8 insertions, 14 deletions
diff --git a/crypto/api.c b/crypto/api.c
index c8ac18f7ac1e..798526d90538 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -457,7 +457,7 @@ void *crypto_create_tfm(struct crypto_alg *alg,
457 int err = -ENOMEM; 457 int err = -ENOMEM;
458 458
459 tfmsize = frontend->tfmsize; 459 tfmsize = frontend->tfmsize;
460 total = tfmsize + sizeof(*tfm) + frontend->extsize(alg, frontend); 460 total = tfmsize + sizeof(*tfm) + frontend->extsize(alg);
461 461
462 mem = kzalloc(total, GFP_KERNEL); 462 mem = kzalloc(total, GFP_KERNEL);
463 if (mem == NULL) 463 if (mem == NULL)
@@ -466,7 +466,7 @@ void *crypto_create_tfm(struct crypto_alg *alg,
466 tfm = (struct crypto_tfm *)(mem + tfmsize); 466 tfm = (struct crypto_tfm *)(mem + tfmsize);
467 tfm->__crt_alg = alg; 467 tfm->__crt_alg = alg;
468 468
469 err = frontend->init_tfm(tfm, frontend); 469 err = frontend->init_tfm(tfm);
470 if (err) 470 if (err)
471 goto out_free_tfm; 471 goto out_free_tfm;
472 472
diff --git a/crypto/pcompress.c b/crypto/pcompress.c
index bcadc03726b7..f7c4a7d7412e 100644
--- a/crypto/pcompress.c
+++ b/crypto/pcompress.c
@@ -36,14 +36,12 @@ static int crypto_pcomp_init(struct crypto_tfm *tfm, u32 type, u32 mask)
36 return 0; 36 return 0;
37} 37}
38 38
39static unsigned int crypto_pcomp_extsize(struct crypto_alg *alg, 39static unsigned int crypto_pcomp_extsize(struct crypto_alg *alg)
40 const struct crypto_type *frontend)
41{ 40{
42 return alg->cra_ctxsize; 41 return alg->cra_ctxsize;
43} 42}
44 43
45static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm, 44static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm)
46 const struct crypto_type *frontend)
47{ 45{
48 return 0; 46 return 0;
49} 47}
diff --git a/crypto/shash.c b/crypto/shash.c
index 3b1b06b3dcf3..7063e1421504 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -448,8 +448,7 @@ static unsigned int crypto_shash_ctxsize(struct crypto_alg *alg, u32 type,
448 return 0; 448 return 0;
449} 449}
450 450
451static int crypto_shash_init_tfm(struct crypto_tfm *tfm, 451static int crypto_shash_init_tfm(struct crypto_tfm *tfm)
452 const struct crypto_type *frontend)
453{ 452{
454 struct crypto_shash *hash = __crypto_shash_cast(tfm); 453 struct crypto_shash *hash = __crypto_shash_cast(tfm);
455 454
@@ -457,8 +456,7 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm,
457 return 0; 456 return 0;
458} 457}
459 458
460static unsigned int crypto_shash_extsize(struct crypto_alg *alg, 459static unsigned int crypto_shash_extsize(struct crypto_alg *alg)
461 const struct crypto_type *frontend)
462{ 460{
463 return alg->cra_ctxsize; 461 return alg->cra_ctxsize;
464} 462}
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 1d15a926041e..7635fde7b1a2 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -22,11 +22,9 @@ struct seq_file;
22 22
23struct crypto_type { 23struct crypto_type {
24 unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); 24 unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask);
25 unsigned int (*extsize)(struct crypto_alg *alg, 25 unsigned int (*extsize)(struct crypto_alg *alg);
26 const struct crypto_type *frontend);
27 int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); 26 int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
28 int (*init_tfm)(struct crypto_tfm *tfm, 27 int (*init_tfm)(struct crypto_tfm *tfm);
29 const struct crypto_type *frontend);
30 void (*show)(struct seq_file *m, struct crypto_alg *alg); 28 void (*show)(struct seq_file *m, struct crypto_alg *alg);
31 struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask); 29 struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask);
32 30