aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/scatterwalk.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/scatterwalk.h')
-rw-r--r--crypto/scatterwalk.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h
index ace595a2e119..f1592cc2d0f4 100644
--- a/crypto/scatterwalk.h
+++ b/crypto/scatterwalk.h
@@ -20,11 +20,9 @@
20 20
21#include "internal.h" 21#include "internal.h"
22 22
23/* Define sg_next is an inline routine now in case we want to change
24 scatterlist to a linked list later. */
25static inline struct scatterlist *sg_next(struct scatterlist *sg) 23static inline struct scatterlist *sg_next(struct scatterlist *sg)
26{ 24{
27 return sg + 1; 25 return (++sg)->length ? sg : (void *)sg->page;
28} 26}
29 27
30static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, 28static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in,