diff options
author | Cristian Stoica <cristian.stoica@freescale.com> | 2015-01-21 04:53:30 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-01-25 19:34:23 -0500 |
commit | 35b82e5540eef2c08f607b9794d68849ebfb7d06 (patch) | |
tree | db3ffbc2e442ea1c62757162391ac9788f790a51 /drivers/crypto | |
parent | 3f80be023900790d029a63e27440f1e33c048b73 (diff) |
crypto: caam - remove dead code
- assoc_nents and src_nents are never zero when all_contig is false
- iv_contig is zero on the else branch
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 3187400daf31..29071a156cbe 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c | |||
@@ -2532,7 +2532,7 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, | |||
2532 | in_options = 0; | 2532 | in_options = 0; |
2533 | } else { | 2533 | } else { |
2534 | src_dma = edesc->sec4_sg_dma; | 2534 | src_dma = edesc->sec4_sg_dma; |
2535 | sec4_sg_index += (iv_contig ? 0 : 1) + edesc->src_nents; | 2535 | sec4_sg_index += edesc->src_nents + 1; |
2536 | in_options = LDST_SGF; | 2536 | in_options = LDST_SGF; |
2537 | } | 2537 | } |
2538 | append_seq_in_ptr(desc, src_dma, req->nbytes + ivsize, in_options); | 2538 | append_seq_in_ptr(desc, src_dma, req->nbytes + ivsize, in_options); |
@@ -2714,10 +2714,10 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req, | |||
2714 | if (!all_contig) { | 2714 | if (!all_contig) { |
2715 | if (!is_gcm) { | 2715 | if (!is_gcm) { |
2716 | sg_to_sec4_sg(req->assoc, | 2716 | sg_to_sec4_sg(req->assoc, |
2717 | (assoc_nents ? : 1), | 2717 | assoc_nents, |
2718 | edesc->sec4_sg + | 2718 | edesc->sec4_sg + |
2719 | sec4_sg_index, 0); | 2719 | sec4_sg_index, 0); |
2720 | sec4_sg_index += assoc_nents ? : 1; | 2720 | sec4_sg_index += assoc_nents; |
2721 | } | 2721 | } |
2722 | 2722 | ||
2723 | dma_to_sec4_sg_one(edesc->sec4_sg + sec4_sg_index, | 2723 | dma_to_sec4_sg_one(edesc->sec4_sg + sec4_sg_index, |
@@ -2726,17 +2726,17 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req, | |||
2726 | 2726 | ||
2727 | if (is_gcm) { | 2727 | if (is_gcm) { |
2728 | sg_to_sec4_sg(req->assoc, | 2728 | sg_to_sec4_sg(req->assoc, |
2729 | (assoc_nents ? : 1), | 2729 | assoc_nents, |
2730 | edesc->sec4_sg + | 2730 | edesc->sec4_sg + |
2731 | sec4_sg_index, 0); | 2731 | sec4_sg_index, 0); |
2732 | sec4_sg_index += assoc_nents ? : 1; | 2732 | sec4_sg_index += assoc_nents; |
2733 | } | 2733 | } |
2734 | 2734 | ||
2735 | sg_to_sec4_sg_last(req->src, | 2735 | sg_to_sec4_sg_last(req->src, |
2736 | (src_nents ? : 1), | 2736 | src_nents, |
2737 | edesc->sec4_sg + | 2737 | edesc->sec4_sg + |
2738 | sec4_sg_index, 0); | 2738 | sec4_sg_index, 0); |
2739 | sec4_sg_index += src_nents ? : 1; | 2739 | sec4_sg_index += src_nents; |
2740 | } | 2740 | } |
2741 | if (dst_nents) { | 2741 | if (dst_nents) { |
2742 | sg_to_sec4_sg_last(req->dst, dst_nents, | 2742 | sg_to_sec4_sg_last(req->dst, dst_nents, |