aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/scatterwalk.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r--crypto/scatterwalk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 50c9461e8cc6..47ac90e615f4 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -100,7 +100,7 @@ void scatterwalk_done(struct scatter_walk *walk, int out, int more)
100int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, 100int scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
101 size_t nbytes, int out) 101 size_t nbytes, int out)
102{ 102{
103 do { 103 while (nbytes > walk->len_this_page) {
104 memcpy_dir(buf, walk->data, walk->len_this_page, out); 104 memcpy_dir(buf, walk->data, walk->len_this_page, out);
105 buf += walk->len_this_page; 105 buf += walk->len_this_page;
106 nbytes -= walk->len_this_page; 106 nbytes -= walk->len_this_page;
@@ -108,7 +108,7 @@ int scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
108 scatterwalk_unmap(walk, out); 108 scatterwalk_unmap(walk, out);
109 scatterwalk_pagedone(walk, out, 1); 109 scatterwalk_pagedone(walk, out, 1);
110 scatterwalk_map(walk, out); 110 scatterwalk_map(walk, out);
111 } while (nbytes > walk->len_this_page); 111 }
112 112
113 memcpy_dir(buf, walk->data, nbytes, out); 113 memcpy_dir(buf, walk->data, nbytes, out);
114 return nbytes; 114 return nbytes;