crypto: api - Remove frontend argument from extsize/init_tfm
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 13 Jul 2009 12:46:25 +0000 (20:46 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Jul 2009 04:58:15 +0000 (12:58 +0800)
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>
crypto/api.c
crypto/pcompress.c
crypto/shash.c
include/crypto/algapi.h

index c8ac18f7ac1e11e186b4c113deaee8d303318d67..798526d9053822640e0747a97c652f1cec402574 100644 (file)
@@ -457,7 +457,7 @@ void *crypto_create_tfm(struct crypto_alg *alg,
        int err = -ENOMEM;
 
        tfmsize = frontend->tfmsize;
-       total = tfmsize + sizeof(*tfm) + frontend->extsize(alg, frontend);
+       total = tfmsize + sizeof(*tfm) + frontend->extsize(alg);
 
        mem = kzalloc(total, GFP_KERNEL);
        if (mem == NULL)
@@ -466,7 +466,7 @@ void *crypto_create_tfm(struct crypto_alg *alg,
        tfm = (struct crypto_tfm *)(mem + tfmsize);
        tfm->__crt_alg = alg;
 
-       err = frontend->init_tfm(tfm, frontend);
+       err = frontend->init_tfm(tfm);
        if (err)
                goto out_free_tfm;
 
index bcadc03726b7eb2d12ac71b251da31e4e38651bf..f7c4a7d7412ee69600ddd018a3099e9e8bb51e69 100644 (file)
@@ -36,14 +36,12 @@ static int crypto_pcomp_init(struct crypto_tfm *tfm, u32 type, u32 mask)
        return 0;
 }
 
-static unsigned int crypto_pcomp_extsize(struct crypto_alg *alg,
-                                        const struct crypto_type *frontend)
+static unsigned int crypto_pcomp_extsize(struct crypto_alg *alg)
 {
        return alg->cra_ctxsize;
 }
 
-static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm,
-                                const struct crypto_type *frontend)
+static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm)
 {
        return 0;
 }
index 3b1b06b3dcf3e30cdb1f1dcf2d7b683c2f7f81f9..7063e1421504a06a244e679b0cafe140bfb39f61 100644 (file)
@@ -448,8 +448,7 @@ static unsigned int crypto_shash_ctxsize(struct crypto_alg *alg, u32 type,
        return 0;
 }
 
-static int crypto_shash_init_tfm(struct crypto_tfm *tfm,
-                                const struct crypto_type *frontend)
+static int crypto_shash_init_tfm(struct crypto_tfm *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;
 }
 
-static unsigned int crypto_shash_extsize(struct crypto_alg *alg,
-                                        const struct crypto_type *frontend)
+static unsigned int crypto_shash_extsize(struct crypto_alg *alg)
 {
        return alg->cra_ctxsize;
 }
index 1d15a926041e7a3d443b697c11ea35969d651e5e..7635fde7b1a286890625c57778ed10e6eb0f90a7 100644 (file)
@@ -22,11 +22,9 @@ struct seq_file;
 
 struct crypto_type {
        unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask);
-       unsigned int (*extsize)(struct crypto_alg *alg,
-                               const struct crypto_type *frontend);
+       unsigned int (*extsize)(struct crypto_alg *alg);
        int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
-       int (*init_tfm)(struct crypto_tfm *tfm,
-                       const struct crypto_type *frontend);
+       int (*init_tfm)(struct crypto_tfm *tfm);
        void (*show)(struct seq_file *m, struct crypto_alg *alg);
        struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask);
 
This page took 0.034369 seconds and 5 git commands to generate.