diff options
Diffstat (limited to 'include/crypto/scatterwalk.h')
-rw-r--r-- | include/crypto/scatterwalk.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h index 7ef512f8631c..20e4226a2e14 100644 --- a/include/crypto/scatterwalk.h +++ b/include/crypto/scatterwalk.h | |||
@@ -33,21 +33,13 @@ static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num, | |||
33 | sg1[num - 1].page_link |= 0x01; | 33 | sg1[num - 1].page_link |= 0x01; |
34 | } | 34 | } |
35 | 35 | ||
36 | static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) | ||
37 | { | ||
38 | if (sg_is_last(sg)) | ||
39 | return NULL; | ||
40 | |||
41 | return (++sg)->length ? sg : sg_chain_ptr(sg); | ||
42 | } | ||
43 | |||
44 | static inline void scatterwalk_crypto_chain(struct scatterlist *head, | 36 | static inline void scatterwalk_crypto_chain(struct scatterlist *head, |
45 | struct scatterlist *sg, | 37 | struct scatterlist *sg, |
46 | int chain, int num) | 38 | int chain, int num) |
47 | { | 39 | { |
48 | if (chain) { | 40 | if (chain) { |
49 | head->length += sg->length; | 41 | head->length += sg->length; |
50 | sg = scatterwalk_sg_next(sg); | 42 | sg = sg_next(sg); |
51 | } | 43 | } |
52 | 44 | ||
53 | if (sg) | 45 | if (sg) |