diff options
author | Eric Biggers <ebiggers@google.com> | 2018-06-30 18:16:11 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-07-08 12:30:24 -0400 |
commit | e50944e219f908968a6e01fbd0e8811a33bd5f04 (patch) | |
tree | bbb469d864e455db482f0240a14b7298604b9551 /crypto/sha3_generic.c | |
parent | 8aeef492fe248e0e56d888e2d5432724ac45f80d (diff) |
crypto: shash - remove useless setting of type flags
Many shash algorithms set .cra_flags = CRYPTO_ALG_TYPE_SHASH. But this
is redundant with the C structure type ('struct shash_alg'), and
crypto_register_shash() 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 shash algorithms.
This patch shouldn't change any actual behavior.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/sha3_generic.c')
-rw-r--r-- | crypto/sha3_generic.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/crypto/sha3_generic.c b/crypto/sha3_generic.c index 264ec12c0b9c..153fe33b8c9b 100644 --- a/crypto/sha3_generic.c +++ b/crypto/sha3_generic.c | |||
@@ -250,7 +250,6 @@ static struct shash_alg algs[] = { { | |||
250 | .descsize = sizeof(struct sha3_state), | 250 | .descsize = sizeof(struct sha3_state), |
251 | .base.cra_name = "sha3-224", | 251 | .base.cra_name = "sha3-224", |
252 | .base.cra_driver_name = "sha3-224-generic", | 252 | .base.cra_driver_name = "sha3-224-generic", |
253 | .base.cra_flags = CRYPTO_ALG_TYPE_SHASH, | ||
254 | .base.cra_blocksize = SHA3_224_BLOCK_SIZE, | 253 | .base.cra_blocksize = SHA3_224_BLOCK_SIZE, |
255 | .base.cra_module = THIS_MODULE, | 254 | .base.cra_module = THIS_MODULE, |
256 | }, { | 255 | }, { |
@@ -261,7 +260,6 @@ static struct shash_alg algs[] = { { | |||
261 | .descsize = sizeof(struct sha3_state), | 260 | .descsize = sizeof(struct sha3_state), |
262 | .base.cra_name = "sha3-256", | 261 | .base.cra_name = "sha3-256", |
263 | .base.cra_driver_name = "sha3-256-generic", | 262 | .base.cra_driver_name = "sha3-256-generic", |
264 | .base.cra_flags = CRYPTO_ALG_TYPE_SHASH, | ||
265 | .base.cra_blocksize = SHA3_256_BLOCK_SIZE, | 263 | .base.cra_blocksize = SHA3_256_BLOCK_SIZE, |
266 | .base.cra_module = THIS_MODULE, | 264 | .base.cra_module = THIS_MODULE, |
267 | }, { | 265 | }, { |
@@ -272,7 +270,6 @@ static struct shash_alg algs[] = { { | |||
272 | .descsize = sizeof(struct sha3_state), | 270 | .descsize = sizeof(struct sha3_state), |
273 | .base.cra_name = "sha3-384", | 271 | .base.cra_name = "sha3-384", |
274 | .base.cra_driver_name = "sha3-384-generic", | 272 | .base.cra_driver_name = "sha3-384-generic", |
275 | .base.cra_flags = CRYPTO_ALG_TYPE_SHASH, | ||
276 | .base.cra_blocksize = SHA3_384_BLOCK_SIZE, | 273 | .base.cra_blocksize = SHA3_384_BLOCK_SIZE, |
277 | .base.cra_module = THIS_MODULE, | 274 | .base.cra_module = THIS_MODULE, |
278 | }, { | 275 | }, { |
@@ -283,7 +280,6 @@ static struct shash_alg algs[] = { { | |||
283 | .descsize = sizeof(struct sha3_state), | 280 | .descsize = sizeof(struct sha3_state), |
284 | .base.cra_name = "sha3-512", | 281 | .base.cra_name = "sha3-512", |
285 | .base.cra_driver_name = "sha3-512-generic", | 282 | .base.cra_driver_name = "sha3-512-generic", |
286 | .base.cra_flags = CRYPTO_ALG_TYPE_SHASH, | ||
287 | .base.cra_blocksize = SHA3_512_BLOCK_SIZE, | 283 | .base.cra_blocksize = SHA3_512_BLOCK_SIZE, |
288 | .base.cra_module = THIS_MODULE, | 284 | .base.cra_module = THIS_MODULE, |
289 | } }; | 285 | } }; |