summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-08-07 12:15:13 -0400
committerJens Axboe <axboe@fb.com>2015-08-17 10:12:54 -0400
commitc56f6d1270b9fc31144b59106bc8590c2acf4a8e (patch)
treeaed4bd399c4b10300da7283e935688d7374e1c3d /crypto
parent02c4de53add1b799f5663d5e9c8e9a5d9366a507 (diff)
crypto: replace scatterwalk_sg_chain with sg_chain
Signed-off-by: Dan Williams <dan.j.williams@intel.com> [hch: split from a larger patch by Dan] Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/algif_skcipher.c2
-rw-r--r--crypto/ccm.c8
-rw-r--r--crypto/gcm.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 945075292bc9..af31a0ee4057 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -145,7 +145,7 @@ static int skcipher_alloc_sgl(struct sock *sk)
145 sgl->cur = 0; 145 sgl->cur = 0;
146 146
147 if (sg) 147 if (sg)
148 scatterwalk_sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg); 148 sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg);
149 149
150 list_add_tail(&sgl->list, &ctx->tsgl); 150 list_add_tail(&sgl->list, &ctx->tsgl);
151 } 151 }
diff --git a/crypto/ccm.c b/crypto/ccm.c
index a4d1a5eda18b..b3f52f50d1c1 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -329,13 +329,13 @@ static int crypto_ccm_encrypt(struct aead_request *req)
329 329
330 sg_init_table(pctx->src, 2); 330 sg_init_table(pctx->src, 2);
331 sg_set_buf(pctx->src, odata, 16); 331 sg_set_buf(pctx->src, odata, 16);
332 scatterwalk_sg_chain(pctx->src, 2, req->src); 332 sg_chain(pctx->src, 2, req->src);
333 333
334 dst = pctx->src; 334 dst = pctx->src;
335 if (req->src != req->dst) { 335 if (req->src != req->dst) {
336 sg_init_table(pctx->dst, 2); 336 sg_init_table(pctx->dst, 2);
337 sg_set_buf(pctx->dst, odata, 16); 337 sg_set_buf(pctx->dst, odata, 16);
338 scatterwalk_sg_chain(pctx->dst, 2, req->dst); 338 sg_chain(pctx->dst, 2, req->dst);
339 dst = pctx->dst; 339 dst = pctx->dst;
340 } 340 }
341 341
@@ -400,13 +400,13 @@ static int crypto_ccm_decrypt(struct aead_request *req)
400 400
401 sg_init_table(pctx->src, 2); 401 sg_init_table(pctx->src, 2);
402 sg_set_buf(pctx->src, authtag, 16); 402 sg_set_buf(pctx->src, authtag, 16);
403 scatterwalk_sg_chain(pctx->src, 2, req->src); 403 sg_chain(pctx->src, 2, req->src);
404 404
405 dst = pctx->src; 405 dst = pctx->src;
406 if (req->src != req->dst) { 406 if (req->src != req->dst) {
407 sg_init_table(pctx->dst, 2); 407 sg_init_table(pctx->dst, 2);
408 sg_set_buf(pctx->dst, authtag, 16); 408 sg_set_buf(pctx->dst, authtag, 16);
409 scatterwalk_sg_chain(pctx->dst, 2, req->dst); 409 sg_chain(pctx->dst, 2, req->dst);
410 dst = pctx->dst; 410 dst = pctx->dst;
411 } 411 }
412 412
diff --git a/crypto/gcm.c b/crypto/gcm.c
index 7d32d4720564..ab0b2f9e8fad 100644
--- a/crypto/gcm.c
+++ b/crypto/gcm.c
@@ -200,14 +200,14 @@ static void crypto_gcm_init_common(struct aead_request *req)
200 sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag)); 200 sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag));
201 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); 201 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen);
202 if (sg != pctx->src + 1) 202 if (sg != pctx->src + 1)
203 scatterwalk_sg_chain(pctx->src, 2, sg); 203 sg_chain(pctx->src, 2, sg);
204 204
205 if (req->src != req->dst) { 205 if (req->src != req->dst) {
206 sg_init_table(pctx->dst, 3); 206 sg_init_table(pctx->dst, 3);
207 sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag)); 207 sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag));
208 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); 208 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen);
209 if (sg != pctx->dst + 1) 209 if (sg != pctx->dst + 1)
210 scatterwalk_sg_chain(pctx->dst, 2, sg); 210 sg_chain(pctx->dst, 2, sg);
211 } 211 }
212} 212}
213 213