Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a38f622 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu
Browse files

crypto: ahash - remove useless setting of type flags



Many ahash algorithms set .cra_flags = CRYPTO_ALG_TYPE_AHASH.  But this
is redundant with the C structure type ('struct ahash_alg'), and
crypto_register_ahash() already sets the type flag automatically,
clearing any type flag that was already there.  Apparently the useless
assignment has just been copy+pasted around.

So, remove the useless assignment from all the ahash algorithms.

This patch shouldn't change any actual behavior.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Acked-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e50944e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static struct ahash_alg ghash_async_alg = {
		.cra_name	= "ghash",
		.cra_driver_name = "ghash-ce",
		.cra_priority	= 300,
		.cra_flags	= CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
		.cra_flags	= CRYPTO_ALG_ASYNC,
		.cra_blocksize	= GHASH_BLOCK_SIZE,
		.cra_type	= &crypto_ahash_type,
		.cra_ctxsize	= sizeof(struct ghash_async_ctx),
+1 −1
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ static struct ahash_alg ghash_async_alg = {
			.cra_driver_name	= "ghash-clmulni",
			.cra_priority		= 400,
			.cra_ctxsize		= sizeof(struct ghash_async_ctx),
			.cra_flags		= CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
			.cra_flags		= CRYPTO_ALG_ASYNC,
			.cra_blocksize		= GHASH_BLOCK_SIZE,
			.cra_type		= &crypto_ahash_type,
			.cra_module		= THIS_MODULE,
+3 −4
Original line number Diff line number Diff line
@@ -746,8 +746,7 @@ static struct ahash_alg sha1_mb_areq_alg = {
			 * algo may not have completed before hashing thread
			 * sleep
			 */
			.cra_flags	= CRYPTO_ALG_TYPE_AHASH |
						CRYPTO_ALG_ASYNC |
			.cra_flags	= CRYPTO_ALG_ASYNC |
					  CRYPTO_ALG_INTERNAL,
			.cra_blocksize	= SHA1_BLOCK_SIZE,
			.cra_module	= THIS_MODULE,
@@ -879,7 +878,7 @@ static struct ahash_alg sha1_mb_async_alg = {
			 * priority at runtime using NETLINK_CRYPTO.
			 */
			.cra_priority           = 50,
			.cra_flags              = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
			.cra_flags              = CRYPTO_ALG_ASYNC,
			.cra_blocksize          = SHA1_BLOCK_SIZE,
			.cra_type               = &crypto_ahash_type,
			.cra_module             = THIS_MODULE,
+3 −5
Original line number Diff line number Diff line
@@ -745,8 +745,7 @@ static struct ahash_alg sha256_mb_areq_alg = {
			 * algo may not have completed before hashing thread
			 * sleep
			 */
			.cra_flags	= CRYPTO_ALG_TYPE_AHASH |
						CRYPTO_ALG_ASYNC |
			.cra_flags	= CRYPTO_ALG_ASYNC |
					  CRYPTO_ALG_INTERNAL,
			.cra_blocksize	= SHA256_BLOCK_SIZE,
			.cra_module	= THIS_MODULE,
@@ -878,8 +877,7 @@ static struct ahash_alg sha256_mb_async_alg = {
			 * priority at runtime using NETLINK_CRYPTO.
			 */
			.cra_priority           = 50,
			.cra_flags              = CRYPTO_ALG_TYPE_AHASH |
							CRYPTO_ALG_ASYNC,
			.cra_flags              = CRYPTO_ALG_ASYNC,
			.cra_blocksize          = SHA256_BLOCK_SIZE,
			.cra_type               = &crypto_ahash_type,
			.cra_module             = THIS_MODULE,
+3 −5
Original line number Diff line number Diff line
@@ -778,8 +778,7 @@ static struct ahash_alg sha512_mb_areq_alg = {
			 * algo may not have completed before hashing thread
			 * sleep
			 */
			.cra_flags	= CRYPTO_ALG_TYPE_AHASH |
						CRYPTO_ALG_ASYNC |
			.cra_flags	= CRYPTO_ALG_ASYNC |
					  CRYPTO_ALG_INTERNAL,
			.cra_blocksize	= SHA512_BLOCK_SIZE,
			.cra_module	= THIS_MODULE,
@@ -912,8 +911,7 @@ static struct ahash_alg sha512_mb_async_alg = {
			 * priority at runtime using NETLINK_CRYPTO.
			 */
			.cra_priority           = 50,
			.cra_flags              = CRYPTO_ALG_TYPE_AHASH |
							CRYPTO_ALG_ASYNC,
			.cra_flags              = CRYPTO_ALG_ASYNC,
			.cra_blocksize          = SHA512_BLOCK_SIZE,
			.cra_type               = &crypto_ahash_type,
			.cra_module             = THIS_MODULE,
Loading