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: aegis - use the new scatterwalk functions

Use scatterwalk_next() which consolidates scatterwalk_clamp() and
scatterwalk_map(), and use scatterwalk_done_src() which consolidates
scatterwalk_unmap(), scatterwalk_advance(), and scatterwalk_done().

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Eric Biggers and committed by
Herbert Xu
c89edd93 cb25dbb6

+4 -6
+4 -6
crypto/aegis128-core.c
··· 284 284 285 285 scatterwalk_start(&walk, sg_src); 286 286 while (assoclen != 0) { 287 - unsigned int size = scatterwalk_clamp(&walk, assoclen); 287 + unsigned int size; 288 + const u8 *mapped = scatterwalk_next(&walk, assoclen, &size); 288 289 unsigned int left = size; 289 - void *mapped = scatterwalk_map(&walk); 290 - const u8 *src = (const u8 *)mapped; 290 + const u8 *src = mapped; 291 291 292 292 if (pos + size >= AEGIS_BLOCK_SIZE) { 293 293 if (pos > 0) { ··· 308 308 309 309 pos += left; 310 310 assoclen -= size; 311 - scatterwalk_unmap(mapped); 312 - scatterwalk_advance(&walk, size); 313 - scatterwalk_done(&walk, 0, assoclen); 311 + scatterwalk_done_src(&walk, mapped, size); 314 312 } 315 313 316 314 if (pos > 0) {