ARM Sunxi Platform Development
 help / color / mirror / Atom feed
* [PATCH 6/7] crypto: sun8i-ce - Use helper to set reqsize
       [not found] <20231218164649.2492465-1-ovidiu.panait@windriver.com>
@ 2023-12-18 16:46 ` ovidiu.panait
  2023-12-18 19:56   ` Jernej Škrabec
  2023-12-18 16:46 ` [PATCH 7/7] crypto: sun8i-ss " ovidiu.panait
  1 sibling, 1 reply; 4+ messages in thread
From: ovidiu.panait @ 2023-12-18 16:46 UTC (permalink / raw)
  To: linux-crypto
  Cc: linux-kernel, herbert, davem, Ovidiu Panait, Corentin Labbe,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, linux-arm-kernel,
	linux-sunxi

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: Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@lists.linux.dev

 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
index 8d4c42863a62..1262a7773ef3 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
@@ -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)),
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 7/7] crypto: sun8i-ss - Use helper to set reqsize
       [not found] <20231218164649.2492465-1-ovidiu.panait@windriver.com>
  2023-12-18 16:46 ` [PATCH 6/7] crypto: sun8i-ce - Use helper to set reqsize ovidiu.panait
@ 2023-12-18 16:46 ` ovidiu.panait
  2023-12-18 19:56   ` Jernej Škrabec
  1 sibling, 1 reply; 4+ messages in thread
From: ovidiu.panait @ 2023-12-18 16:46 UTC (permalink / raw)
  To: linux-crypto
  Cc: linux-kernel, herbert, davem, Ovidiu Panait, Corentin Labbe,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, linux-arm-kernel,
	linux-sunxi

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: Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@lists.linux.dev

 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
index 7fa359725ec7..9b9605ce8ee6 100644
--- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
@@ -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)),
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 6/7] crypto: sun8i-ce - Use helper to set reqsize
  2023-12-18 16:46 ` [PATCH 6/7] crypto: sun8i-ce - Use helper to set reqsize ovidiu.panait
@ 2023-12-18 19:56   ` Jernej Škrabec
  0 siblings, 0 replies; 4+ messages in thread
From: Jernej Škrabec @ 2023-12-18 19:56 UTC (permalink / raw)
  To: linux-crypto, ovidiu.panait
  Cc: linux-kernel, herbert, davem, Ovidiu Panait, Corentin Labbe,
	Chen-Yu Tsai, Samuel Holland, linux-arm-kernel, linux-sunxi

Dne ponedeljek, 18. december 2023 ob 17:46:48 CET je ovidiu.panait@windriver.com napisal(a):
> 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>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 7/7] crypto: sun8i-ss - Use helper to set reqsize
  2023-12-18 16:46 ` [PATCH 7/7] crypto: sun8i-ss " ovidiu.panait
@ 2023-12-18 19:56   ` Jernej Škrabec
  0 siblings, 0 replies; 4+ messages in thread
From: Jernej Škrabec @ 2023-12-18 19:56 UTC (permalink / raw)
  To: linux-crypto, ovidiu.panait
  Cc: linux-kernel, herbert, davem, Ovidiu Panait, Corentin Labbe,
	Chen-Yu Tsai, Samuel Holland, linux-arm-kernel, linux-sunxi

Dne ponedeljek, 18. december 2023 ob 17:46:49 CET je ovidiu.panait@windriver.com napisal(a):
> 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>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-18 19:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20231218164649.2492465-1-ovidiu.panait@windriver.com>
2023-12-18 16:46 ` [PATCH 6/7] crypto: sun8i-ce - Use helper to set reqsize 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox