summaryrefslogtreecommitdiff
path: root/include/crypto/algapi.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2025-03-08 20:45:25 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2025-03-15 16:21:22 +0800
commitdb873be6f0549597f92c72986b1939643a7f9a75 (patch)
tree49378fa9f942e756cf49ea22dd571c425d32324e /include/crypto/algapi.h
parent131bdceca1f0a2d9381270dc40f898458e5e184b (diff)
crypto: skcipher - Eliminate duplicate virt.addr field
Reuse the addr field from struct scatter_walk for skcipher_walk. Keep the existing virt.addr fields but make them const for the user to access the mapped address. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r--include/crypto/algapi.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index f92e22686a68..6e07bbc04089 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -107,14 +107,15 @@ struct crypto_queue {
};
struct scatter_walk {
- struct scatterlist *sg;
- unsigned int offset;
+ /* Must be the first member, see struct skcipher_walk. */
union {
void *const addr;
/* Private API field, do not touch. */
union crypto_no_such_thing *__addr;
};
+ struct scatterlist *sg;
+ unsigned int offset;
};
struct crypto_attr_alg {