summaryrefslogtreecommitdiff
path: root/crypto/scatterwalk.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-10-22 19:40:16 +0200
committerJens Axboe <jens.axboe@oracle.com>2007-10-22 19:40:16 +0200
commit6297497ab9f28fffe561d3c2b4acd9d3c520926d (patch)
tree4a337f214b49b701c9925ab1dd9dc253f22daa6f /crypto/scatterwalk.h
parent22e580c71505243109c0ce0bea8e709b2f96d704 (diff)
downloadlinux-crypto-6297497ab9f28fffe561d3c2b4acd9d3c520926d.tar.gz
linux-crypto-6297497ab9f28fffe561d3c2b4acd9d3c520926d.zip
[SG] Update crypto/ to sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'crypto/scatterwalk.h')
-rw-r--r--crypto/scatterwalk.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h
index 9c73e37a..87ed681c 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)