aboutsummaryrefslogtreecommitdiff
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 ace595a2e11..f1592cc2d0f 100644
--- a/crypto/scatterwalk.h
+++ b/crypto/scatterwalk.h
@@ -20,11 +20,9 @@
#include "internal.h"
-/* Define sg_next is an inline routine now in case we want to change
- scatterlist to a linked list later. */
static inline struct scatterlist *sg_next(struct scatterlist *sg)
{
- return sg + 1;
+ return (++sg)->length ? sg : (void *)sg->page;
}
static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in,