From: ovidiu.panait@windriver.com
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au,
davem@davemloft.net, Ovidiu Panait <ovidiu.panait@windriver.com>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Lars Persson <lars.persson@axis.com>,
linux-arm-kernel@axis.com
Subject: [PATCH 3/7] crypto: artpec6 - Use helper to set reqsize
Date: Mon, 18 Dec 2023 18:46:45 +0200 [thread overview]
Message-ID: <20231218164649.2492465-3-ovidiu.panait@windriver.com> (raw)
In-Reply-To: <20231218164649.2492465-1-ovidiu.panait@windriver.com>
From: Ovidiu Panait <ovidiu.panait@windriver.com>
The value of reqsize must only be changed through the helper.
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Lars Persson <lars.persson@axis.com>
Cc: linux-arm-kernel@axis.com
drivers/crypto/axis/artpec6_crypto.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c
index ef9fe13ffa59..dbc1d483f2af 100644
--- a/drivers/crypto/axis/artpec6_crypto.c
+++ b/drivers/crypto/axis/artpec6_crypto.c
@@ -1535,7 +1535,8 @@ static int artpec6_crypto_aes_ecb_init(struct crypto_skcipher *tfm)
{
struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
- tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
+ crypto_skcipher_set_reqsize(tfm,
+ sizeof(struct artpec6_crypto_request_context));
ctx->crypto_type = ARTPEC6_CRYPTO_CIPHER_AES_ECB;
return 0;
@@ -1551,7 +1552,8 @@ static int artpec6_crypto_aes_ctr_init(struct crypto_skcipher *tfm)
if (IS_ERR(ctx->fallback))
return PTR_ERR(ctx->fallback);
- tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
+ crypto_skcipher_set_reqsize(tfm,
+ sizeof(struct artpec6_crypto_request_context));
ctx->crypto_type = ARTPEC6_CRYPTO_CIPHER_AES_CTR;
return 0;
@@ -1561,7 +1563,8 @@ static int artpec6_crypto_aes_cbc_init(struct crypto_skcipher *tfm)
{
struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
- tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
+ crypto_skcipher_set_reqsize(tfm,
+ sizeof(struct artpec6_crypto_request_context));
ctx->crypto_type = ARTPEC6_CRYPTO_CIPHER_AES_CBC;
return 0;
@@ -1571,7 +1574,8 @@ static int artpec6_crypto_aes_xts_init(struct crypto_skcipher *tfm)
{
struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
- tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
+ crypto_skcipher_set_reqsize(tfm,
+ sizeof(struct artpec6_crypto_request_context));
ctx->crypto_type = ARTPEC6_CRYPTO_CIPHER_AES_XTS;
return 0;
--
2.34.1
next prev parent reply other threads:[~2023-12-18 16:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 16:46 [PATCH 1/7] crypto: rk3288 - Use helper to set reqsize ovidiu.panait
2023-12-18 16:46 ` [PATCH 2/7] crypto: amlogic " ovidiu.panait
2023-12-18 16:46 ` ovidiu.panait [this message]
2023-12-18 16:46 ` [PATCH 4/7] crypto: stm32/cryp " ovidiu.panait
2023-12-18 16:46 ` [PATCH 5/7] crypto: sl3516 " ovidiu.panait
2023-12-18 23:44 ` Linus Walleij
2023-12-18 16:46 ` [PATCH 6/7] crypto: sun8i-ce " ovidiu.panait
2023-12-18 19:56 ` Jernej Škrabec
2023-12-18 16:46 ` [PATCH 7/7] crypto: sun8i-ss " ovidiu.panait
2023-12-18 19:56 ` Jernej Škrabec
2023-12-29 3:28 ` [PATCH 1/7] crypto: rk3288 " Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231218164649.2492465-3-ovidiu.panait@windriver.com \
--to=ovidiu.panait@windriver.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jesper.nilsson@axis.com \
--cc=lars.persson@axis.com \
--cc=linux-arm-kernel@axis.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox