summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Stoica <cristian.stoica@freescale.com>2015-01-20 10:06:16 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-01-26 11:34:22 +1100
commit1206eddfc81bb6e7f67c2a9b3b93c6ccd5495f2b (patch)
tree596be691451e88a999bfe238e1d6fb4573a4ff0b
parent439e6c93e275bd72d51bed0fdca493ffa8eaaa4a (diff)
downloadlinux-crypto-1206eddfc81bb6e7f67c2a9b3b93c6ccd5495f2b.tar.gz
linux-crypto-1206eddfc81bb6e7f67c2a9b3b93c6ccd5495f2b.zip
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: e1831a52fbacad9aa2bcc90636f2a8e03584d90c reverted in cf51b44c8b86c241584aefaa1f612cbe8f75123f Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/ablkcipher.c3
-rw-r--r--crypto/ahash.c2
-rw-r--r--crypto/scatterwalk.c6
3 files changed, 5 insertions, 6 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 7bbc8b4e..db201bca 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -87,8 +87,7 @@ static inline unsigned int ablkcipher_done_slow(struct ablkcipher_walk *walk,
if (n == len_this_page)
break;
n -= len_this_page;
- scatterwalk_start(&walk->out, scatterwalk_sg_next(
- walk->out.sg));
+ scatterwalk_start(&walk->out, sg_next(walk->out.sg));
}
return bsize;
diff --git a/crypto/ahash.c b/crypto/ahash.c
index dd289060..8acb8860 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)
if (!walk->total)
return 0;
- walk->sg = scatterwalk_sg_next(walk->sg);
+ walk->sg = sg_next(walk->sg);
return hash_walk_new_entry(walk);
}
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 79ca2278..3bd749c7 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -62,7 +62,7 @@ static void scatterwalk_pagedone(struct scatter_walk *walk, int out,
walk->offset += PAGE_SIZE - 1;
walk->offset &= PAGE_MASK;
if (walk->offset >= walk->sg->offset + walk->sg->length)
- scatterwalk_start(walk, scatterwalk_sg_next(walk->sg));
+ scatterwalk_start(walk, sg_next(walk->sg));
}
}
@@ -116,7 +116,7 @@ void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg,
break;
offset += sg->length;
- sg = scatterwalk_sg_next(sg);
+ sg = sg_next(sg);
}
scatterwalk_advance(&walk, start - offset);
@@ -136,7 +136,7 @@ int scatterwalk_bytes_sglen(struct scatterlist *sg, int num_bytes)
do {
offset += sg->length;
n++;
- sg = scatterwalk_sg_next(sg);
+ sg = sg_next(sg);
/* num_bytes is too large */
if (unlikely(!sg && (num_bytes < offset)))