aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-07-07 08:54:35 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2008-07-10 08:35:18 -0400
commit166247f46a9c866e6f7f7d2212be875fb82212a1 (patch)
tree54818c04ba4224b1a3d717f0dbf62456bb32deaa
parentca786dc738f4f583b57b1bba7a335b5e8233f4b0 (diff)
crypto: hash - Removed vestigial ahash fields
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>
-rw-r--r--crypto/ahash.c1
-rw-r--r--crypto/digest.c1
-rw-r--r--crypto/hash.c1
-rw-r--r--include/linux/crypto.h7
4 files changed, 2 insertions, 8 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 8c1f918a6878..e6e5906ca80a 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -76,7 +76,6 @@ static int crypto_init_ahash_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
76 crt->final = alg->final; 76 crt->final = alg->final;
77 crt->digest = alg->digest; 77 crt->digest = alg->digest;
78 crt->setkey = ahash_setkey; 78 crt->setkey = ahash_setkey;
79 crt->base = __crypto_ahash_cast(tfm);
80 crt->digestsize = alg->digestsize; 79 crt->digestsize = alg->digestsize;
81 80
82 return 0; 81 return 0;
diff --git a/crypto/digest.c b/crypto/digest.c
index d63d5d96feec..bf332982c50d 100644
--- a/crypto/digest.c
+++ b/crypto/digest.c
@@ -234,7 +234,6 @@ int crypto_init_digest_ops_async(struct crypto_tfm *tfm)
234 crt->setkey = dalg->dia_setkey ? digest_async_setkey : 234 crt->setkey = dalg->dia_setkey ? digest_async_setkey :
235 digest_async_nosetkey; 235 digest_async_nosetkey;
236 crt->digestsize = dalg->dia_digestsize; 236 crt->digestsize = dalg->dia_digestsize;
237 crt->base = __crypto_ahash_cast(tfm);
238 237
239 return 0; 238 return 0;
240} 239}
diff --git a/crypto/hash.c b/crypto/hash.c
index 0d7caa9ab748..140a75565f15 100644
--- a/crypto/hash.c
+++ b/crypto/hash.c
@@ -128,7 +128,6 @@ static int crypto_init_hash_ops_async(struct crypto_tfm *tfm)
128 crt->digest = hash_async_digest; 128 crt->digest = hash_async_digest;
129 crt->setkey = hash_async_setkey; 129 crt->setkey = hash_async_setkey;
130 crt->digestsize = alg->digestsize; 130 crt->digestsize = alg->digestsize;
131 crt->base = __crypto_ahash_cast(tfm);
132 131
133 return 0; 132 return 0;
134} 133}
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index b6efe569128d..68ef293644d3 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -137,8 +137,6 @@ struct ablkcipher_request {
137struct ahash_request { 137struct ahash_request {
138 struct crypto_async_request base; 138 struct crypto_async_request base;
139 139
140 void *info;
141
142 unsigned int nbytes; 140 unsigned int nbytes;
143 struct scatterlist *src; 141 struct scatterlist *src;
144 u8 *result; 142 u8 *result;
@@ -420,7 +418,6 @@ struct ahash_tfm {
420 unsigned int keylen); 418 unsigned int keylen);
421 419
422 unsigned int digestsize; 420 unsigned int digestsize;
423 struct crypto_ahash *base;
424 unsigned int reqsize; 421 unsigned int reqsize;
425}; 422};
426 423
@@ -1384,7 +1381,7 @@ static inline int crypto_ahash_setkey(struct crypto_ahash *tfm,
1384{ 1381{
1385 struct ahash_tfm *crt = crypto_ahash_crt(tfm); 1382 struct ahash_tfm *crt = crypto_ahash_crt(tfm);
1386 1383
1387 return crt->setkey(crt->base, key, keylen); 1384 return crt->setkey(tfm, key, keylen);
1388} 1385}
1389 1386
1390static inline int crypto_ahash_digest(struct ahash_request *req) 1387static inline int crypto_ahash_digest(struct ahash_request *req)
@@ -1396,7 +1393,7 @@ static inline int crypto_ahash_digest(struct ahash_request *req)
1396static inline void ahash_request_set_tfm(struct ahash_request *req, 1393static inline void ahash_request_set_tfm(struct ahash_request *req,
1397 struct crypto_ahash *tfm) 1394 struct crypto_ahash *tfm)
1398{ 1395{
1399 req->base.tfm = crypto_ahash_tfm(crypto_ahash_crt(tfm)->base); 1396 req->base.tfm = crypto_ahash_tfm(tfm);
1400} 1397}
1401 1398
1402static inline struct ahash_request *ahash_request_alloc( 1399static inline struct ahash_request *ahash_request_alloc(