Skip to contentSkip to conversation

crypto: rk3288 - Use helper to set reqsize

PATCH In review [email protected] 4 participants 11 messages Dec 18, 2023 – Dec 29, 2023

Subsystems (11)
lore
Share & tools
lore
#0 lore raw

PATCH 1/7 crypto: rk3288 - Use helper to set reqsize

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

---
Cc: Heiko Stuebner <[email protected]>
Cc: Corentin Labbe <[email protected]>
Cc: [email protected]
Cc: [email protected]

 drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/rockchip/rk3288_crypto_skcipher.c +2 -2
index da95747d973f..9393e10671c2 100644
@@ -445,8 +445,8 @@ static int rk_cipher_tfm_init(struct crypto_skcipher *tfm)
 		return PTR_ERR(ctx->fallback_tfm);
 	}
 
-	tfm->reqsize = sizeof(struct rk_cipher_rctx) +
-		crypto_skcipher_reqsize(ctx->fallback_tfm);
+	crypto_skcipher_set_reqsize(tfm, sizeof(struct rk_cipher_rctx) +
+				    crypto_skcipher_reqsize(ctx->fallback_tfm));
 
 	return 0;
 }
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/7 crypto: amlogic - Use helper to set reqsize

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

---
Cc: Corentin Labbe <[email protected]>
Cc: [email protected]

 drivers/crypto/amlogic/amlogic-gxl-cipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/amlogic/amlogic-gxl-cipher.c +2 -2
index 3308406612fc..29048da6f50a 100644
@@ -327,8 +327,8 @@ int meson_cipher_init(struct crypto_tfm *tfm)
 		return PTR_ERR(op->fallback_tfm);
 	}
 
-	sktfm->reqsize = sizeof(struct meson_cipher_req_ctx) +
-			 crypto_skcipher_reqsize(op->fallback_tfm);
+	crypto_skcipher_set_reqsize(sktfm, sizeof(struct meson_cipher_req_ctx) +
+				    crypto_skcipher_reqsize(op->fallback_tfm));
 
 	return 0;
 }
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/7 crypto: artpec6 - Use helper to set reqsize

In reply to [email protected]

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

---
Cc: Jesper Nilsson <[email protected]>
Cc: Lars Persson <[email protected]>
Cc: [email protected]

 drivers/crypto/axis/artpec6_crypto.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/crypto/axis/artpec6_crypto.c +8 -4
index ef9fe13ffa59..dbc1d483f2af 100644
@@ -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;
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/7 crypto: stm32/cryp - Use helper to set reqsize

In reply to [email protected]

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

---
Cc: Maxime Coquelin <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: [email protected]
Cc: [email protected]

 drivers/crypto/stm32/stm32-cryp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/stm32/stm32-cryp.c +1 -1
index c3cbc2673338..11ad4ffdce0d 100644
@@ -838,7 +838,7 @@ static int stm32_cryp_aead_one_req(struct crypto_engine *engine, void *areq);
 
 static int stm32_cryp_aes_aead_init(struct crypto_aead *tfm)
 {
-	tfm->reqsize = sizeof(struct stm32_cryp_reqctx);
+	crypto_aead_set_reqsize(tfm, sizeof(struct stm32_cryp_reqctx));
 
 	return 0;
 }
Signature · 1 line
2.34.1
#4 lore raw

PATCH 5/7 crypto: sl3516 - Use helper to set reqsize

In reply to [email protected]

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

---
Cc: Hans Ulli Kroll <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Corentin Labbe <[email protected]>
Cc: [email protected]

 drivers/crypto/gemini/sl3516-ce-cipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/gemini/sl3516-ce-cipher.c +2 -2
index 49dce9e0a834..583010b2d007 100644
@@ -332,8 +332,8 @@ int sl3516_ce_cipher_init(struct crypto_tfm *tfm)
 		return PTR_ERR(op->fallback_tfm);
 	}
 
-	sktfm->reqsize = sizeof(struct sl3516_ce_cipher_req_ctx) +
-			 crypto_skcipher_reqsize(op->fallback_tfm);
+	crypto_skcipher_set_reqsize(sktfm, sizeof(struct sl3516_ce_cipher_req_ctx) +
+				    crypto_skcipher_reqsize(op->fallback_tfm));
 
 	dev_info(op->ce->dev, "Fallback for %s is %s\n",
 		 crypto_tfm_alg_driver_name(&sktfm->base),
Signature · 1 line
2.34.1
#6 lore raw

PATCH 6/7 crypto: sun8i-ce - Use helper to set reqsize

In reply to [email protected]

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

---
Cc: Corentin Labbe <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Samuel Holland <[email protected]>
Cc: [email protected]
Cc: [email protected]

 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +2 -2
index 8d4c42863a62..1262a7773ef3 100644
@@ -431,8 +431,8 @@ int sun8i_ce_cipher_init(struct crypto_tfm *tfm)
 		return PTR_ERR(op->fallback_tfm);
 	}
 
-	sktfm->reqsize = sizeof(struct sun8i_cipher_req_ctx) +
-			 crypto_skcipher_reqsize(op->fallback_tfm);
+	crypto_skcipher_set_reqsize(sktfm, sizeof(struct sun8i_cipher_req_ctx) +
+				    crypto_skcipher_reqsize(op->fallback_tfm));
 
 	memcpy(algt->fbname,
 	       crypto_tfm_alg_driver_name(crypto_skcipher_tfm(op->fallback_tfm)),
Signature · 1 line
2.34.1
#8 lore raw

PATCH 7/7 crypto: sun8i-ss - Use helper to set reqsize

In reply to [email protected]

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

---
Cc: Corentin Labbe <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Samuel Holland <[email protected]>
Cc: [email protected]
Cc: [email protected]

 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c +2 -3
index 7fa359725ec7..9b9605ce8ee6 100644
@@ -405,9 +405,8 @@ int sun8i_ss_cipher_init(struct crypto_tfm *tfm)
 		return PTR_ERR(op->fallback_tfm);
 	}
 
-	sktfm->reqsize = sizeof(struct sun8i_cipher_req_ctx) +
-			 crypto_skcipher_reqsize(op->fallback_tfm);
-
+	crypto_skcipher_set_reqsize(sktfm, sizeof(struct sun8i_cipher_req_ctx) +
+				    crypto_skcipher_reqsize(op->fallback_tfm));
 
 	memcpy(algt->fbname,
 	       crypto_tfm_alg_driver_name(crypto_skcipher_tfm(op->fallback_tfm)),
Signature · 1 line
2.34.1
maintainer
#10 lore raw
In reply to [email protected]
Quoted 5 lines · On Mon, Dec 18, 2023 at 06:46:43PM +0200, [email protected] wrote:

From: Ovidiu Panait <[email protected]>

The value of reqsize must only be changed through the helper.

Quoted 8 lines

---
Cc: Heiko Stuebner <[email protected]>
Cc: Corentin Labbe <[email protected]>
Cc: [email protected]
Cc: [email protected]

 drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

All applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt