diff options
author | Eric Biggers <ebiggers@google.com> | 2018-11-14 14:35:48 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-11-20 01:26:55 -0500 |
commit | d41655909e3236bfb00aa69f435a9634cd74b60b (patch) | |
tree | d32474c083af2f55acaa1cba1701a19b91deb324 /crypto | |
parent | 2b78aeb366365bd9cbf56c710e8b2ac494620306 (diff) |
crypto: remove useless initializations of cra_list
Some algorithms initialize their .cra_list prior to registration.
But this is unnecessary since crypto_register_alg() will overwrite
.cra_list when adding the algorithm to the 'crypto_alg_list'.
Apparently the useless assignment has just been copy+pasted around.
So, remove the useless assignments.
Exception: paes_s390.c uses cra_list to check whether the algorithm is
registered or not, so I left that as-is for now.
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')
-rw-r--r-- | crypto/lz4.c | 1 | ||||
-rw-r--r-- | crypto/lz4hc.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/crypto/lz4.c b/crypto/lz4.c index 2ce2660d3519..c160dfdbf2e0 100644 --- a/crypto/lz4.c +++ b/crypto/lz4.c | |||
@@ -122,7 +122,6 @@ static struct crypto_alg alg_lz4 = { | |||
122 | .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, | 122 | .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, |
123 | .cra_ctxsize = sizeof(struct lz4_ctx), | 123 | .cra_ctxsize = sizeof(struct lz4_ctx), |
124 | .cra_module = THIS_MODULE, | 124 | .cra_module = THIS_MODULE, |
125 | .cra_list = LIST_HEAD_INIT(alg_lz4.cra_list), | ||
126 | .cra_init = lz4_init, | 125 | .cra_init = lz4_init, |
127 | .cra_exit = lz4_exit, | 126 | .cra_exit = lz4_exit, |
128 | .cra_u = { .compress = { | 127 | .cra_u = { .compress = { |
diff --git a/crypto/lz4hc.c b/crypto/lz4hc.c index 2be14f054daf..583b5e013d7a 100644 --- a/crypto/lz4hc.c +++ b/crypto/lz4hc.c | |||
@@ -123,7 +123,6 @@ static struct crypto_alg alg_lz4hc = { | |||
123 | .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, | 123 | .cra_flags = CRYPTO_ALG_TYPE_COMPRESS, |
124 | .cra_ctxsize = sizeof(struct lz4hc_ctx), | 124 | .cra_ctxsize = sizeof(struct lz4hc_ctx), |
125 | .cra_module = THIS_MODULE, | 125 | .cra_module = THIS_MODULE, |
126 | .cra_list = LIST_HEAD_INIT(alg_lz4hc.cra_list), | ||
127 | .cra_init = lz4hc_init, | 126 | .cra_init = lz4hc_init, |
128 | .cra_exit = lz4hc_exit, | 127 | .cra_exit = lz4hc_exit, |
129 | .cra_u = { .compress = { | 128 | .cra_u = { .compress = { |