aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorCristian Stoica <cristian.stoica@freescale.com>2015-01-20 03:06:16 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2015-01-25 19:34:22 -0500
commit5be4d4c94b1f98b839344fda7a8752a4a09d0ef5 (patch)
tree7af802fd927fea331cfb43c9b4d7978b5a607fda /include/crypto
parent088f628cc0898c4f0da7e91945f9f43a0b18a3bf (diff)
crypto: replace scatterwalk_sg_next with sg_next
Modify crypto drivers to use the generic SG helper since both of them are equivalent and the one from crypto is redundant. See also: 468577abe37ff7b453a9ac613e0ea155349203ae reverted in b2ab4a57b018aafbba35bff088218f5cc3d2142e Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/scatterwalk.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h
index 7ef512f8631c..20e4226a2e14 100644
--- a/include/crypto/scatterwalk.h
+++ b/include/crypto/scatterwalk.h
@@ -33,21 +33,13 @@ static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num,
33 sg1[num - 1].page_link |= 0x01; 33 sg1[num - 1].page_link |= 0x01;
34} 34}
35 35
36static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
37{
38 if (sg_is_last(sg))
39 return NULL;
40
41 return (++sg)->length ? sg : sg_chain_ptr(sg);
42}
43
44static inline void scatterwalk_crypto_chain(struct scatterlist *head, 36static inline void scatterwalk_crypto_chain(struct scatterlist *head,
45 struct scatterlist *sg, 37 struct scatterlist *sg,
46 int chain, int num) 38 int chain, int num)
47{ 39{
48 if (chain) { 40 if (chain) {
49 head->length += sg->length; 41 head->length += sg->length;
50 sg = scatterwalk_sg_next(sg); 42 sg = sg_next(sg);
51 } 43 }
52 44
53 if (sg) 45 if (sg)