diff options
author | Cristian Stoica <cristian.stoica@freescale.com> | 2015-01-20 03:06:16 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-01-25 19:34:22 -0500 |
commit | 5be4d4c94b1f98b839344fda7a8752a4a09d0ef5 (patch) | |
tree | 7af802fd927fea331cfb43c9b4d7978b5a607fda /crypto | |
parent | 088f628cc0898c4f0da7e91945f9f43a0b18a3bf (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 'crypto')
-rw-r--r-- | crypto/ablkcipher.c | 3 | ||||
-rw-r--r-- | crypto/ahash.c | 2 | ||||
-rw-r--r-- | crypto/scatterwalk.c | 6 |
3 files changed, 5 insertions, 6 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index 7bbc8b4ef2e9..db201bca1581 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c | |||
@@ -87,8 +87,7 @@ static inline unsigned int ablkcipher_done_slow(struct ablkcipher_walk *walk, | |||
87 | if (n == len_this_page) | 87 | if (n == len_this_page) |
88 | break; | 88 | break; |
89 | n -= len_this_page; | 89 | n -= len_this_page; |
90 | scatterwalk_start(&walk->out, scatterwalk_sg_next( | 90 | scatterwalk_start(&walk->out, sg_next(walk->out.sg)); |
91 | walk->out.sg)); | ||
92 | } | 91 | } |
93 | 92 | ||
94 | return bsize; | 93 | return bsize; |
diff --git a/crypto/ahash.c b/crypto/ahash.c index dd2890608aeb..8acb886032ae 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c | |||
@@ -121,7 +121,7 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err) | |||
121 | if (!walk->total) | 121 | if (!walk->total) |
122 | return 0; | 122 | return 0; |
123 | 123 | ||
124 | walk->sg = scatterwalk_sg_next(walk->sg); | 124 | walk->sg = sg_next(walk->sg); |
125 | 125 | ||
126 | return hash_walk_new_entry(walk); | 126 | return hash_walk_new_entry(walk); |
127 | } | 127 | } |
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index 79ca2278c2a3..3bd749c7bb70 100644 --- a/crypto/scatterwalk.c +++ b/crypto/scatterwalk.c | |||
@@ -62,7 +62,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out, | |||
62 | walk->offset += PAGE_SIZE - 1; | 62 | walk->offset += PAGE_SIZE - 1; |
63 | walk->offset &= PAGE_MASK; | 63 | walk->offset &= PAGE_MASK; |
64 | if (walk->offset >= walk->sg->offset + walk->sg->length) | 64 | if (walk->offset >= walk->sg->offset + walk->sg->length) |
65 | scatterwalk_start(walk, scatterwalk_sg_next(walk->sg)); | 65 | scatterwalk_start(walk, sg_next(walk->sg)); |
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
@@ -116,7 +116,7 @@ void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg, | |||
116 | break; | 116 | break; |
117 | 117 | ||
118 | offset += sg->length; | 118 | offset += sg->length; |
119 | sg = scatterwalk_sg_next(sg); | 119 | sg = sg_next(sg); |
120 | } | 120 | } |
121 | 121 | ||
122 | scatterwalk_advance(&walk, start - offset); | 122 | scatterwalk_advance(&walk, start - offset); |
@@ -136,7 +136,7 @@ int scatterwalk_bytes_sglen(struct scatterlist *sg, int num_bytes) | |||
136 | do { | 136 | do { |
137 | offset += sg->length; | 137 | offset += sg->length; |
138 | n++; | 138 | n++; |
139 | sg = scatterwalk_sg_next(sg); | 139 | sg = sg_next(sg); |
140 | 140 | ||
141 | /* num_bytes is too large */ | 141 | /* num_bytes is too large */ |
142 | if (unlikely(!sg && (num_bytes < offset))) | 142 | if (unlikely(!sg && (num_bytes < offset))) |