diff mbox series

[16/17] crypto: hctr2 - stop using alignmask of shash_alg

Message ID 20231019055343.588846-17-ebiggers@kernel.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: stop supporting alignmask in shash | expand

Commit Message

Eric Biggers Oct. 19, 2023, 5:53 a.m. UTC
From: Eric Biggers <ebiggers@google.com>

Now that the shash algorithm type does not support nonzero alignmasks,
shash_alg::base.cra_alignmask is always 0, so OR-ing it into another
value is a no-op.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 crypto/hctr2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/crypto/hctr2.c b/crypto/hctr2.c
index 653fde727f0fa..87e7547ad1862 100644
--- a/crypto/hctr2.c
+++ b/crypto/hctr2.c
@@ -478,22 +478,21 @@  static int hctr2_create_common(struct crypto_template *tmpl,
 		goto err_free_inst;
 	if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME,
 		     "hctr2_base(%s,%s)",
 		     xctr_alg->base.cra_driver_name,
 		     polyval_alg->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME)
 		goto err_free_inst;
 
 	inst->alg.base.cra_blocksize = BLOCKCIPHER_BLOCK_SIZE;
 	inst->alg.base.cra_ctxsize = sizeof(struct hctr2_tfm_ctx) +
 				     polyval_alg->statesize * 2;
-	inst->alg.base.cra_alignmask = xctr_alg->base.cra_alignmask |
-				       polyval_alg->base.cra_alignmask;
+	inst->alg.base.cra_alignmask = xctr_alg->base.cra_alignmask;
 	/*
 	 * The hash function is called twice, so it is weighted higher than the
 	 * xctr and blockcipher.
 	 */
 	inst->alg.base.cra_priority = (2 * xctr_alg->base.cra_priority +
 				       4 * polyval_alg->base.cra_priority +
 				       blockcipher_alg->cra_priority) / 7;
 
 	inst->alg.setkey = hctr2_setkey;
 	inst->alg.encrypt = hctr2_encrypt;