summaryrefslogtreecommitdiff
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 @@
#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,