]> err.no Git - linux-2.6/commitdiff
crypto: hash - Removed vestigial ahash fields
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 7 Jul 2008 12:54:35 +0000 (20:54 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jul 2008 12:35:18 +0000 (20:35 +0800)
The base field in ahash_tfm appears to have been cut-n-pasted from
ablkcipher.  It isn't needed here at all.  Similarly, the info field
in ahash_request also appears to have originated from its cipher
counter-part and is vestigial.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ahash.c
crypto/digest.c
crypto/hash.c
include/linux/crypto.h

index 8c1f918a6878bbb2883a5609bbe9cf1f61a49bca..e6e5906ca80a91c0c1c568ec9e5749f8ebb42352 100644 (file)
@@ -76,7 +76,6 @@ static int crypto_init_ahash_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
        crt->final  = alg->final;
        crt->digest = alg->digest;
        crt->setkey = ahash_setkey;
-       crt->base   = __crypto_ahash_cast(tfm);
        crt->digestsize = alg->digestsize;
 
        return 0;
index d63d5d96feecc4e7e040765d4719992737b0c345..bf332982c50dbf77f64b7304d16a4673b73e414a 100644 (file)
@@ -234,7 +234,6 @@ int crypto_init_digest_ops_async(struct crypto_tfm *tfm)
        crt->setkey     = dalg->dia_setkey ? digest_async_setkey :
                                                digest_async_nosetkey;
        crt->digestsize = dalg->dia_digestsize;
-       crt->base       = __crypto_ahash_cast(tfm);
 
        return 0;
 }
index 0d7caa9ab748d96883f4dbfeb2612aab5b5e314f..140a75565f155b2d4b0b12c31545a77d172648bc 100644 (file)
@@ -128,7 +128,6 @@ static int crypto_init_hash_ops_async(struct crypto_tfm *tfm)
        crt->digest     = hash_async_digest;
        crt->setkey     = hash_async_setkey;
        crt->digestsize = alg->digestsize;
-       crt->base       = __crypto_ahash_cast(tfm);
 
        return 0;
 }
index b6efe569128d8cf5a786100346a65789ad8fdd08..68ef293644d37afa081a3aaeacf8b23718bf4135 100644 (file)
@@ -137,8 +137,6 @@ struct ablkcipher_request {
 struct ahash_request {
        struct crypto_async_request base;
 
-       void *info;
-
        unsigned int nbytes;
        struct scatterlist *src;
        u8                 *result;
@@ -420,7 +418,6 @@ struct ahash_tfm {
                        unsigned int keylen);
 
        unsigned int digestsize;
-       struct crypto_ahash *base;
        unsigned int reqsize;
 };
 
@@ -1384,7 +1381,7 @@ static inline int crypto_ahash_setkey(struct crypto_ahash *tfm,
 {
        struct ahash_tfm *crt = crypto_ahash_crt(tfm);
 
-       return crt->setkey(crt->base, key, keylen);
+       return crt->setkey(tfm, key, keylen);
 }
 
 static inline int crypto_ahash_digest(struct ahash_request *req)
@@ -1396,7 +1393,7 @@ static inline int crypto_ahash_digest(struct ahash_request *req)
 static inline void ahash_request_set_tfm(struct ahash_request *req,
                                         struct crypto_ahash *tfm)
 {
-       req->base.tfm = crypto_ahash_tfm(crypto_ahash_crt(tfm)->base);
+       req->base.tfm = crypto_ahash_tfm(tfm);
 }
 
 static inline struct ahash_request *ahash_request_alloc(