crypto: scatterwalk - Change scatterwalk_next calling convention

Rather than returning the address and storing the length into an
argument pointer, add an address field to the walk struct and use
that to store the address.  The length is returned directly.

Change the done functions to use this stored address instead of
getting them from the caller.

Split the address into two using a union.  The user should only
access the const version so that it is never changed.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu
2025-03-08 20:45:21 +08:00
parent b949f55644
commit 65775cf313
14 changed files with 78 additions and 78 deletions

View File

@@ -54,6 +54,7 @@ struct rtattr;
struct scatterlist;
struct seq_file;
struct sk_buff;
union crypto_no_such_thing;
struct crypto_instance {
struct crypto_alg alg;
@@ -108,6 +109,12 @@ struct crypto_queue {
struct scatter_walk {
struct scatterlist *sg;
unsigned int offset;
union {
void *const addr;
/* Private API field, do not touch. */
union crypto_no_such_thing *__addr;
};
};
struct crypto_attr_alg {