From 78c2f0b8c285c5305b3e67b0595200541e15eb43 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 22 Oct 2007 19:40:16 +0200 Subject: [SG] Update crypto/ to sg helpers Signed-off-by: Jens Axboe --- crypto/scatterwalk.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/scatterwalk.h') diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h index 9c73e37..87ed681 100644 --- a/crypto/scatterwalk.h +++ b/crypto/scatterwalk.h @@ -22,13 +22,13 @@ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) { - return (++sg)->length ? sg : (void *)sg->page; + return (++sg)->length ? sg : (void *) sg_page(sg); } static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, struct scatter_walk *walk_out) { - return !(((walk_in->sg->page - walk_out->sg->page) << PAGE_SHIFT) + + return !(((sg_page(walk_in->sg) - sg_page(walk_out->sg)) << PAGE_SHIFT) + (int)(walk_in->offset - walk_out->offset)); } @@ -60,7 +60,7 @@ static inline unsigned int scatterwalk_aligned(struct scatter_walk *walk, static inline struct page *scatterwalk_page(struct scatter_walk *walk) { - return walk->sg->page + (walk->offset >> PAGE_SHIFT); + return sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); } static inline void scatterwalk_unmap(void *vaddr, int out) -- cgit v1.1