Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger...
[cascardo/linux.git] / include / crypto / scatterwalk.h
index 7ef512f..20e4226 100644 (file)
@@ -33,21 +33,13 @@ static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num,
        sg1[num - 1].page_link |= 0x01;
 }
 
-static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
-{
-       if (sg_is_last(sg))
-               return NULL;
-
-       return (++sg)->length ? sg : sg_chain_ptr(sg);
-}
-
 static inline void scatterwalk_crypto_chain(struct scatterlist *head,
                                            struct scatterlist *sg,
                                            int chain, int num)
 {
        if (chain) {
                head->length += sg->length;
-               sg = scatterwalk_sg_next(sg);
+               sg = sg_next(sg);
        }
 
        if (sg)