]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - crypto/scatterwalk.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
[karo-tx-linux.git] / crypto / scatterwalk.h
index ace595a2e1191cfaceac5562068b411aa66512c1..f1592cc2d0f42bb76132667fe69cf3f5e61bb8cb 100644 (file)
 
 #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,