diff options
| author | Lukas Wunner <lukas@wunner.de> | 2025-02-03 14:37:03 +0100 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-02-22 15:56:02 +0800 |
| commit | aefeca1188962da52e3ed35ddb865d37a216dd53 (patch) | |
| tree | d044f76e377af5da48103ed79d0a142967b008d5 /drivers/crypto/virtio/virtio_crypto_akcipher_algs.c | |
| parent | 17410baf65c51d9792528c5484c8167bd186e98d (diff) | |
crypto: virtio - Drop superfluous ctx->tfm backpointer
struct virtio_crypto_[as]kcipher_ctx contains a backpointer to struct
crypto_[as]kcipher which is superfluous in two ways:
First, it's not used anywhere. Second, the context is embedded into
struct crypto_tfm, so one could just use container_of() to get from the
context to crypto_tfm and from there to crypto_[as]kcipher.
Drop the superfluous backpointer.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/virtio/virtio_crypto_akcipher_algs.c')
| -rw-r--r-- | drivers/crypto/virtio/virtio_crypto_akcipher_algs.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c b/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c index 7fdf32c79909..aa8255786d6c 100644 --- a/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c @@ -26,7 +26,6 @@ struct virtio_crypto_rsa_ctx { struct virtio_crypto_akcipher_ctx { struct virtio_crypto *vcrypto; - struct crypto_akcipher *tfm; bool session_valid; __u64 session_id; union { @@ -447,10 +446,6 @@ static unsigned int virtio_crypto_rsa_max_size(struct crypto_akcipher *tfm) static int virtio_crypto_rsa_init_tfm(struct crypto_akcipher *tfm) { - struct virtio_crypto_akcipher_ctx *ctx = akcipher_tfm_ctx(tfm); - - ctx->tfm = tfm; - akcipher_set_reqsize(tfm, sizeof(struct virtio_crypto_akcipher_request)); |
