diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 13:40:16 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 13:40:16 -0400 |
commit | 78c2f0b8c285c5305b3e67b0595200541e15eb43 (patch) | |
tree | 6537a046641e9a3dba3f4735b42d7f04e60e29f8 /crypto/scatterwalk.h | |
parent | 9b61764bcb4360e04386f0415a01da8271631004 (diff) |
[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.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h index 9c73e37a42ce..87ed681cceba 100644 --- a/crypto/scatterwalk.h +++ b/crypto/scatterwalk.h | |||
@@ -22,13 +22,13 @@ | |||
22 | 22 | ||
23 | static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) | 23 | static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) |
24 | { | 24 | { |
25 | return (++sg)->length ? sg : (void *)sg->page; | 25 | return (++sg)->length ? sg : (void *) sg_page(sg); |
26 | } | 26 | } |
27 | 27 | ||
28 | static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, | 28 | static inline unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, |
29 | struct scatter_walk *walk_out) | 29 | struct scatter_walk *walk_out) |
30 | { | 30 | { |
31 | return !(((walk_in->sg->page - walk_out->sg->page) << PAGE_SHIFT) + | 31 | return !(((sg_page(walk_in->sg) - sg_page(walk_out->sg)) << PAGE_SHIFT) + |
32 | (int)(walk_in->offset - walk_out->offset)); | 32 | (int)(walk_in->offset - walk_out->offset)); |
33 | } | 33 | } |
34 | 34 | ||
@@ -60,7 +60,7 @@ static inline unsigned int scatterwalk_aligned(struct scatter_walk *walk, | |||
60 | 60 | ||
61 | static inline struct page *scatterwalk_page(struct scatter_walk *walk) | 61 | static inline struct page *scatterwalk_page(struct scatter_walk *walk) |
62 | { | 62 | { |
63 | return walk->sg->page + (walk->offset >> PAGE_SHIFT); | 63 | return sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline void scatterwalk_unmap(void *vaddr, int out) | 66 | static inline void scatterwalk_unmap(void *vaddr, int out) |