Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: hash - Use nth_page instead of doing it by hand

Use nth_page instead of adding n to the page pointer.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+2 -2
+2 -2
crypto/ahash.c
··· 80 80 81 81 sg = walk->sg; 82 82 walk->offset = sg->offset; 83 - walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); 83 + walk->pg = nth_page(sg_page(walk->sg), (walk->offset >> PAGE_SHIFT)); 84 84 walk->offset = offset_in_page(walk->offset); 85 85 walk->entrylen = sg->length; 86 86 ··· 221 221 if (!IS_ENABLED(CONFIG_HIGHMEM)) 222 222 return crypto_shash_digest(desc, data, nbytes, req->result); 223 223 224 - page += offset >> PAGE_SHIFT; 224 + page = nth_page(page, offset >> PAGE_SHIFT); 225 225 offset = offset_in_page(offset); 226 226 227 227 if (nbytes > (unsigned int)PAGE_SIZE - offset)