All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe@baylibre.com>
To: davem@davemloft.net, herbert@gondor.apana.org.au,
	mripard@kernel.org, wens@csie.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Corentin Labbe <clabbe@baylibre.com>
Subject: [PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes
Date: Tue, 21 Jul 2020 19:06:25 +0000	[thread overview]
Message-ID: <1595358391-34525-12-git-send-email-clabbe@baylibre.com> (raw)
In-Reply-To: <1595358391-34525-1-git-send-email-clabbe@baylibre.com>

Hash algorithms will need also a spetial t_dlen handling, but since the
meaning will be different, rename the current flag to specify it apply
only on ciphers algorithms.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +-
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c   | 2 +-
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h        | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
index fa12c966c45f..2dcf508b0f18 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
@@ -119,7 +119,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req
 	common |= rctx->op_dir | CE_COMM_INT;
 	cet->t_common_ctl = cpu_to_le32(common);
 	/* CTS and recent CE (H6) need length in bytes, in word otherwise */
-	if (ce->variant->has_t_dlen_in_bytes)
+	if (ce->variant->cipher_t_dlen_in_bytes)
 		cet->t_dlen = cpu_to_le32(areq->cryptlen);
 	else
 		cet->t_dlen = cpu_to_le32(areq->cryptlen / 4);
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
index 4cc98180be3f..de4d70f87a9c 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
@@ -61,7 +61,7 @@ static const struct ce_variant ce_h6_variant = {
 	},
 	.op_mode = { CE_OP_ECB, CE_OP_CBC
 	},
-	.has_t_dlen_in_bytes = true,
+	.cipher_t_dlen_in_bytes = true,
 	.ce_clks = {
 		{ "bus", 0, 200000000 },
 		{ "mod", 300000000, 0 },
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
index eea0847dc1e8..3dbf8ca47b7c 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
@@ -97,7 +97,7 @@ struct ce_clock {
  * @alg_cipher:	list of supported ciphers. for each CE_ID_ this will give the
  *              coresponding CE_ALG_XXX value
  * @op_mode:	list of supported block modes
- * @has_t_dlen_in_bytes:	Does the request size for cipher is in
+ * @cipher_t_dlen_in_bytes:	Does the request size for cipher is in
  *				bytes or words
  * @ce_clks:	list of clocks needed by this variant
  * @esr:	The type of error register
@@ -105,7 +105,7 @@ struct ce_clock {
 struct ce_variant {
 	char alg_cipher[CE_ID_CIPHER_MAX];
 	u32 op_mode[CE_ID_OP_MAX];
-	bool has_t_dlen_in_bytes;
+	bool cipher_t_dlen_in_bytes;
 	struct ce_clock ce_clks[CE_MAX_CLOCKS];
 	int esr;
 };
-- 
2.26.2


WARNING: multiple messages have this Message-ID (diff)
From: Corentin Labbe <clabbe@baylibre.com>
To: davem@davemloft.net, herbert@gondor.apana.org.au,
	mripard@kernel.org, wens@csie.org
Cc: Corentin Labbe <clabbe@baylibre.com>,
	linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes
Date: Tue, 21 Jul 2020 19:06:25 +0000	[thread overview]
Message-ID: <1595358391-34525-12-git-send-email-clabbe@baylibre.com> (raw)
In-Reply-To: <1595358391-34525-1-git-send-email-clabbe@baylibre.com>

Hash algorithms will need also a spetial t_dlen handling, but since the
meaning will be different, rename the current flag to specify it apply
only on ciphers algorithms.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +-
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c   | 2 +-
 drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h        | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
index fa12c966c45f..2dcf508b0f18 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
@@ -119,7 +119,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req
 	common |= rctx->op_dir | CE_COMM_INT;
 	cet->t_common_ctl = cpu_to_le32(common);
 	/* CTS and recent CE (H6) need length in bytes, in word otherwise */
-	if (ce->variant->has_t_dlen_in_bytes)
+	if (ce->variant->cipher_t_dlen_in_bytes)
 		cet->t_dlen = cpu_to_le32(areq->cryptlen);
 	else
 		cet->t_dlen = cpu_to_le32(areq->cryptlen / 4);
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
index 4cc98180be3f..de4d70f87a9c 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
@@ -61,7 +61,7 @@ static const struct ce_variant ce_h6_variant = {
 	},
 	.op_mode = { CE_OP_ECB, CE_OP_CBC
 	},
-	.has_t_dlen_in_bytes = true,
+	.cipher_t_dlen_in_bytes = true,
 	.ce_clks = {
 		{ "bus", 0, 200000000 },
 		{ "mod", 300000000, 0 },
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
index eea0847dc1e8..3dbf8ca47b7c 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
@@ -97,7 +97,7 @@ struct ce_clock {
  * @alg_cipher:	list of supported ciphers. for each CE_ID_ this will give the
  *              coresponding CE_ALG_XXX value
  * @op_mode:	list of supported block modes
- * @has_t_dlen_in_bytes:	Does the request size for cipher is in
+ * @cipher_t_dlen_in_bytes:	Does the request size for cipher is in
  *				bytes or words
  * @ce_clks:	list of clocks needed by this variant
  * @esr:	The type of error register
@@ -105,7 +105,7 @@ struct ce_clock {
 struct ce_variant {
 	char alg_cipher[CE_ID_CIPHER_MAX];
 	u32 op_mode[CE_ID_OP_MAX];
-	bool has_t_dlen_in_bytes;
+	bool cipher_t_dlen_in_bytes;
 	struct ce_clock ce_clks[CE_MAX_CLOCKS];
 	int esr;
 };
-- 
2.26.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-07-21 19:07 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 19:06 [PATCH v4 00/17] crypto: allwinner: add xRNG and hashes Corentin Labbe
2020-07-21 19:06 ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 01/17] crypto: sun8i-ss: Add SS_START define Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 02/17] crypto: sun8i-ss: Add support for the PRNG Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 03/17] crypto: sun8i-ss: support hash algorithms Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 04/17] crypto: sun8i-ss: fix a trivial typo Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 05/17] crypto: sun8i-ss: Add more comment on some structures Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 06/17] crypto: sun8i-ss: better debug printing Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 07/17] crypto: sun8i-ce: handle endianness of t_common_ctl Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 08/17] crypto: sun8i-ce: move iv data to request context Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-31  8:24   ` Herbert Xu
2020-07-31  8:24     ` Herbert Xu
2020-08-21  7:35     ` LABBE Corentin
2020-08-21  7:35       ` LABBE Corentin
2020-08-21  7:36       ` Herbert Xu
2020-08-21  7:36         ` Herbert Xu
2020-07-21 19:06 ` [PATCH v4 09/17] crypto: sun8i-ce: split into prepare/run/unprepare Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 10/17] crypto: sun8i-ce: handle different error registers Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` Corentin Labbe [this message]
2020-07-21 19:06   ` [PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 12/17] crypto: sun8i-ce: support hash algorithms Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 13/17] crypto: sun8i-ce: Add stat_bytes debugfs Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 14/17] crypto: sun8i-ce: Add support for the PRNG Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 15/17] crypto: sun8i-ce: Add support for the TRNG Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 19:06 ` [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe
2020-07-21 21:32   ` Joe Perches
2020-07-21 21:32     ` Joe Perches
2020-07-22  4:57     ` [PATCH] Makefile.extrawarn: Move sign-compare from W=2 to W=3 Joe Perches
2020-07-22  4:57       ` Joe Perches
2020-07-27  4:55       ` Masahiro Yamada
2020-07-27  4:55         ` Masahiro Yamada
2020-07-22  6:21     ` [PATCH v4 16/17] crypto: sun8i-ce: fix comparison of integer expressions of different signedness LABBE Corentin
2020-07-22  6:21       ` LABBE Corentin
2020-07-21 19:06 ` [PATCH v4 17/17] crypto: sun8i-ss: " Corentin Labbe
2020-07-21 19:06   ` Corentin Labbe

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=1595358391-34525-12-git-send-email-clabbe@baylibre.com \
    --to=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.