aboutsummaryrefslogtreecommitdiff
path: root/crypto/scatterwalk.c
diff options
context:
space:
mode:
authorHerbert Xu2016-07-12 13:17:53 +0800
committerHerbert Xu2016-07-18 17:35:48 +0800
commit5506f53c7cc17c4ad5e69e5512a35faf77182986 (patch)
tree6b58558fb6945fc5d90958a45e7f4852a11ab037 /crypto/scatterwalk.c
parent7c001a8650e67cb293120044c3f62756258ed27c (diff)
crypto: scatterwalk - Remove scatterwalk_bytes_sglen
This patch removes the now unused scatterwalk_bytes_sglen. Anyone using this out-of-tree should switch over to sg_nents_for_len. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r--crypto/scatterwalk.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index ea5815c5e128..03ca4aef1b9d 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -125,28 +125,6 @@ void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg,
}
EXPORT_SYMBOL_GPL(scatterwalk_map_and_copy);
-int scatterwalk_bytes_sglen(struct scatterlist *sg, int num_bytes)
-{
- int offset = 0, n = 0;
-
- /* num_bytes is too small */
- if (num_bytes < sg->length)
- return -1;
-
- do {
- offset += sg->length;
- n++;
- sg = sg_next(sg);
-
- /* num_bytes is too large */
- if (unlikely(!sg && (num_bytes < offset)))
- return -1;
- } while (sg && (num_bytes > offset));
-
- return n;
-}
-EXPORT_SYMBOL_GPL(scatterwalk_bytes_sglen);
-
struct scatterlist *scatterwalk_ffwd(struct scatterlist dst[2],
struct scatterlist *src,
unsigned int len)