X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fscatterwalk.h;h=e79925c474a3a2eb6de0fe120d1e0151acd45530;hb=6c9c0b52b8c6b68b05bb06efd7079a8fc5e9ba60;hp=5495bb9708167a05146df272ff616c0ddb227033;hpb=c774e93e2152d0be2612739418689e6e6400f4eb;p=linux-2.6 diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h index 5495bb9708..e79925c474 100644 --- a/crypto/scatterwalk.h +++ b/crypto/scatterwalk.h @@ -55,6 +55,12 @@ static inline void scatterwalk_advance(struct scatter_walk *walk, walk->len_this_segment -= nbytes; } +static inline unsigned int scatterwalk_aligned(struct scatter_walk *walk, + unsigned int alignmask) +{ + return !(walk->offset & alignmask); +} + void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg); int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, size_t nbytes, int out); void scatterwalk_map(struct scatter_walk *walk, int out);