X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=include%2Fcrypto%2Fscatterwalk.h;h=20e4226a2e14e68e3a5e6fc6541993ff228919d7;hb=c833e17e276bd5d5f174aa924c4f102754ebc2be;hp=7ef512f8631c134be5f37589a57f1824bc42742b;hpb=b2d1965dcea148100ffc4e7199470bf5fad13871;p=cascardo%2Flinux.git diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h index 7ef512f8631c..20e4226a2e14 100644 --- a/include/crypto/scatterwalk.h +++ b/include/crypto/scatterwalk.h @@ -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)