diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-03-08 20:45:25 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-03-15 16:21:22 +0800 |
| commit | db873be6f0549597f92c72986b1939643a7f9a75 (patch) | |
| tree | 49378fa9f942e756cf49ea22dd571c425d32324e /include/crypto/internal/skcipher.h | |
| parent | 131bdceca1f0a2d9381270dc40f898458e5e184b (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/internal/skcipher.h')
| -rw-r--r-- | include/crypto/internal/skcipher.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h index d6ae7a86fed2..c705124432c5 100644 --- a/include/crypto/internal/skcipher.h +++ b/include/crypto/internal/skcipher.h @@ -56,15 +56,31 @@ struct crypto_lskcipher_spawn { struct skcipher_walk { union { + /* Virtual address of the source. */ struct { - void *addr; - } virt; - } src, dst; + struct { + void *const addr; + } virt; + } src; + + /* Private field for the API, do not use. */ + struct scatter_walk in; + }; - struct scatter_walk in; unsigned int nbytes; - struct scatter_walk out; + union { + /* Virtual address of the destination. */ + struct { + struct { + void *const addr; + } virt; + } dst; + + /* Private field for the API, do not use. */ + struct scatter_walk out; + }; + unsigned int total; u8 *page; |