From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-kernel@vger.kernel.org, Tero Kristo <t-kristo@ti.com>,
Keerthy <j-keerthy@ti.com>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH] crypto: sa2ul - Remove unused fields
Date: Fri, 2 Oct 2026 14:50:19 -0700 [thread overview]
Message-ID: <20261002215019.14822-1-ebiggers@kernel.org> (raw)
Remove the shash, authkey, and auth fields from sa_tfm_ctx since they
have no purpose and create confusion with fields that actually matter.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
drivers/crypto/sa2ul.c | 9 ---------
drivers/crypto/sa2ul.h | 3 ---
2 files changed, 12 deletions(-)
diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
index b014350a3da0..4557eae94164 100644
--- a/drivers/crypto/sa2ul.c
+++ b/drivers/crypto/sa2ul.c
@@ -1388,7 +1388,6 @@ static int sa_sha_run(struct ahash_request *req)
static int sa_sha_setup(struct sa_tfm_ctx *ctx, struct algo_data *ad)
{
- int bs = crypto_shash_blocksize(ctx->shash);
int cmdl_len;
struct sa_cmdl_cfg cfg;
@@ -1396,7 +1395,6 @@ static int sa_sha_setup(struct sa_tfm_ctx *ctx, struct algo_data *ad)
ad->auth_eng.eng_id = SA_ENG_ID_AM1;
ad->auth_eng.sc_size = SA_CTX_AUTH_TYPE2_SZ;
- memset(ctx->authkey, 0, bs);
memset(&cfg, 0, sizeof(cfg));
cfg.aalg = ad->aalg_id;
cfg.enc_eng_id = ad->enc_eng.eng_id;
@@ -1439,12 +1437,6 @@ static int sa_sha_cra_init_alg(struct crypto_tfm *tfm, const char *alg_base)
return ret;
if (alg_base) {
- ctx->shash = crypto_alloc_shash(alg_base, 0, 0);
- if (IS_ERR(ctx->shash)) {
- dev_err(sa_k3_dev, "base driver %s couldn't be loaded\n",
- alg_base);
- return PTR_ERR(ctx->shash);
- }
/* for fallback */
ctx->fallback.ahash =
crypto_alloc_ahash(alg_base, 0, CRYPTO_ALG_ASYNC);
@@ -1599,7 +1591,6 @@ static void sa_sha_cra_exit(struct crypto_tfm *tfm)
if (crypto_tfm_alg_type(tfm) == CRYPTO_ALG_TYPE_AHASH)
sa_free_ctx_info(&ctx->enc, data);
- crypto_free_shash(ctx->shash);
crypto_free_ahash(ctx->fallback.ahash);
}
diff --git a/drivers/crypto/sa2ul.h b/drivers/crypto/sa2ul.h
index 12c17a68d350..211ef4e40f22 100644
--- a/drivers/crypto/sa2ul.h
+++ b/drivers/crypto/sa2ul.h
@@ -307,12 +307,9 @@ struct sa_tfm_ctx {
struct sa_crypto_data *dev_data;
struct sa_ctx_info enc;
struct sa_ctx_info dec;
- struct sa_ctx_info auth;
int keylen;
int iv_idx;
u32 key[AES_KEYSIZE_256 / sizeof(u32)];
- u8 authkey[SHA512_BLOCK_SIZE];
- struct crypto_shash *shash;
/* for fallback */
union {
struct crypto_skcipher *skcipher;
base-commit: 4c3ca7c8c152278332590bfd3df1b0f086364759
--
2.56.0
next reply other threads:[~2026-10-02 21:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 21:50 Eric Biggers [this message]
2026-10-08 8:35 ` [PATCH] crypto: sa2ul - Remove unused fields 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=20261002215019.14822-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=j-keerthy@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s-vadapalli@ti.com \
--cc=t-kristo@ti.com \
/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.