aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/scatterwalk.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/scatterwalk.h')
-rw-r--r--crypto/scatterwalk.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h
index 5495bb970816..e79925c474a3 100644
--- a/crypto/scatterwalk.h
+++ b/crypto/scatterwalk.h
@@ -55,6 +55,12 @@ static inline void scatterwalk_advance(struct scatter_walk *walk,
55 walk->len_this_segment -= nbytes; 55 walk->len_this_segment -= nbytes;
56} 56}
57 57
58static inline unsigned int scatterwalk_aligned(struct scatter_walk *walk,
59 unsigned int alignmask)
60{
61 return !(walk->offset & alignmask);
62}
63
58void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg); 64void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg);
59int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, size_t nbytes, int out); 65int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, size_t nbytes, int out);
60void scatterwalk_map(struct scatter_walk *walk, int out); 66void scatterwalk_map(struct scatter_walk *walk, int out);