aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-22 04:11:03 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-25 20:37:16 -0400
commit65a23d6706ce2d58e302970971e41688783bf63f (patch)
tree811ab592f530386d452843ce0f541909fd1e4229
parentc9aa55e5271a53d28e93fa58759d318b403c15ba (diff)
n2_crypto: Kill n2_base_ctx and helpers.
Unused, and we'll do this via the request context. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/crypto/n2_core.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 23163fda5035..3a4eed4bba2a 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -239,18 +239,7 @@ static inline bool n2_should_run_async(struct spu_queue *qp, int this_len)
239} 239}
240#endif 240#endif
241 241
242struct n2_base_ctx {
243 struct list_head list;
244};
245
246static void n2_base_ctx_init(struct n2_base_ctx *ctx)
247{
248 INIT_LIST_HEAD(&ctx->list);
249}
250
251struct n2_hash_ctx { 242struct n2_hash_ctx {
252 struct n2_base_ctx base;
253
254 struct crypto_ahash *fallback_tfm; 243 struct crypto_ahash *fallback_tfm;
255}; 244};
256 245
@@ -390,7 +379,6 @@ static int n2_hash_async_digest(struct ahash_request *req,
390 unsigned int result_size, void *hash_loc) 379 unsigned int result_size, void *hash_loc)
391{ 380{
392 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); 381 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
393 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm);
394 struct cwq_initial_entry *ent; 382 struct cwq_initial_entry *ent;
395 struct crypto_hash_walk walk; 383 struct crypto_hash_walk walk;
396 struct spu_queue *qp; 384 struct spu_queue *qp;
@@ -403,6 +391,7 @@ static int n2_hash_async_digest(struct ahash_request *req,
403 */ 391 */
404 if (unlikely(req->nbytes > (1 << 16))) { 392 if (unlikely(req->nbytes > (1 << 16))) {
405 struct n2_hash_req_ctx *rctx = ahash_request_ctx(req); 393 struct n2_hash_req_ctx *rctx = ahash_request_ctx(req);
394 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm);
406 395
407 ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback_tfm); 396 ahash_request_set_tfm(&rctx->fallback_req, ctx->fallback_tfm);
408 rctx->fallback_req.base.flags = 397 rctx->fallback_req.base.flags =
@@ -414,8 +403,6 @@ static int n2_hash_async_digest(struct ahash_request *req,
414 return crypto_ahash_digest(&rctx->fallback_req); 403 return crypto_ahash_digest(&rctx->fallback_req);
415 } 404 }
416 405
417 n2_base_ctx_init(&ctx->base);
418
419 nbytes = crypto_hash_walk_first(req, &walk); 406 nbytes = crypto_hash_walk_first(req, &walk);
420 407
421 cpu = get_cpu(); 408 cpu = get_cpu();