diff options
Diffstat (limited to 'include/crypto/scatterwalk.h')
-rw-r--r-- | include/crypto/scatterwalk.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h index 07b6f17122d2..bd62431c33bd 100644 --- a/include/crypto/scatterwalk.h +++ b/include/crypto/scatterwalk.h | |||
@@ -52,6 +52,17 @@ static inline void crypto_yield(u32 flags) | |||
52 | cond_resched(); | 52 | cond_resched(); |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num, | ||
56 | struct scatterlist *sg2) | ||
57 | { | ||
58 | sg_set_page(&sg1[num - 1], (void *)sg2, 0, 0); | ||
59 | } | ||
60 | |||
61 | static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) | ||
62 | { | ||
63 | return (++sg)->length ? sg : (void *)sg_page(sg); | ||
64 | } | ||
65 | |||
55 | static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, | 66 | static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, |
56 | struct scatter_walk *walk_out) | 67 | struct scatter_walk *walk_out) |
57 | { | 68 | { |