diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2012-07-11 07:21:01 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-08-01 05:47:29 -0400 |
commit | 37743cc0d34c4c5cb8520bc27eb2a45141e938fe (patch) | |
tree | 76474cdd421d2c7146472a971efe20df2a85b05c | |
parent | e15aa3692da1dcee3172966a878b04a1e0f514b3 (diff) |
crypto: arch/s390 - cleanup - remove unneeded cra_list initialization
Initialization of cra_list is currently mixed, most ciphers initialize this
field and most shashes do not. Initialization however is not needed at all
since cra_list is initialized/overwritten in __crypto_register_alg() with
list_add(). Therefore perform cleanup to remove all unneeded initializations
of this field in 'arch/s390/crypto/'
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: linux-s390@vger.kernel.org
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | arch/s390/crypto/aes_s390.c | 5 | ||||
-rw-r--r-- | arch/s390/crypto/des_s390.c | 10 | ||||
-rw-r--r-- | arch/s390/crypto/ghash_s390.c | 1 |
3 files changed, 0 insertions, 16 deletions
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c index e402a9dd4eda..da3c1a7dcd8e 100644 --- a/arch/s390/crypto/aes_s390.c +++ b/arch/s390/crypto/aes_s390.c | |||
@@ -216,7 +216,6 @@ static struct crypto_alg aes_alg = { | |||
216 | .cra_blocksize = AES_BLOCK_SIZE, | 216 | .cra_blocksize = AES_BLOCK_SIZE, |
217 | .cra_ctxsize = sizeof(struct s390_aes_ctx), | 217 | .cra_ctxsize = sizeof(struct s390_aes_ctx), |
218 | .cra_module = THIS_MODULE, | 218 | .cra_module = THIS_MODULE, |
219 | .cra_list = LIST_HEAD_INIT(aes_alg.cra_list), | ||
220 | .cra_init = fallback_init_cip, | 219 | .cra_init = fallback_init_cip, |
221 | .cra_exit = fallback_exit_cip, | 220 | .cra_exit = fallback_exit_cip, |
222 | .cra_u = { | 221 | .cra_u = { |
@@ -398,7 +397,6 @@ static struct crypto_alg ecb_aes_alg = { | |||
398 | .cra_ctxsize = sizeof(struct s390_aes_ctx), | 397 | .cra_ctxsize = sizeof(struct s390_aes_ctx), |
399 | .cra_type = &crypto_blkcipher_type, | 398 | .cra_type = &crypto_blkcipher_type, |
400 | .cra_module = THIS_MODULE, | 399 | .cra_module = THIS_MODULE, |
401 | .cra_list = LIST_HEAD_INIT(ecb_aes_alg.cra_list), | ||
402 | .cra_init = fallback_init_blk, | 400 | .cra_init = fallback_init_blk, |
403 | .cra_exit = fallback_exit_blk, | 401 | .cra_exit = fallback_exit_blk, |
404 | .cra_u = { | 402 | .cra_u = { |
@@ -508,7 +506,6 @@ static struct crypto_alg cbc_aes_alg = { | |||
508 | .cra_ctxsize = sizeof(struct s390_aes_ctx), | 506 | .cra_ctxsize = sizeof(struct s390_aes_ctx), |
509 | .cra_type = &crypto_blkcipher_type, | 507 | .cra_type = &crypto_blkcipher_type, |
510 | .cra_module = THIS_MODULE, | 508 | .cra_module = THIS_MODULE, |
511 | .cra_list = LIST_HEAD_INIT(cbc_aes_alg.cra_list), | ||
512 | .cra_init = fallback_init_blk, | 509 | .cra_init = fallback_init_blk, |
513 | .cra_exit = fallback_exit_blk, | 510 | .cra_exit = fallback_exit_blk, |
514 | .cra_u = { | 511 | .cra_u = { |
@@ -710,7 +707,6 @@ static struct crypto_alg xts_aes_alg = { | |||
710 | .cra_ctxsize = sizeof(struct s390_xts_ctx), | 707 | .cra_ctxsize = sizeof(struct s390_xts_ctx), |
711 | .cra_type = &crypto_blkcipher_type, | 708 | .cra_type = &crypto_blkcipher_type, |
712 | .cra_module = THIS_MODULE, | 709 | .cra_module = THIS_MODULE, |
713 | .cra_list = LIST_HEAD_INIT(xts_aes_alg.cra_list), | ||
714 | .cra_init = xts_fallback_init, | 710 | .cra_init = xts_fallback_init, |
715 | .cra_exit = xts_fallback_exit, | 711 | .cra_exit = xts_fallback_exit, |
716 | .cra_u = { | 712 | .cra_u = { |
@@ -832,7 +828,6 @@ static struct crypto_alg ctr_aes_alg = { | |||
832 | .cra_ctxsize = sizeof(struct s390_aes_ctx), | 828 | .cra_ctxsize = sizeof(struct s390_aes_ctx), |
833 | .cra_type = &crypto_blkcipher_type, | 829 | .cra_type = &crypto_blkcipher_type, |
834 | .cra_module = THIS_MODULE, | 830 | .cra_module = THIS_MODULE, |
835 | .cra_list = LIST_HEAD_INIT(ctr_aes_alg.cra_list), | ||
836 | .cra_u = { | 831 | .cra_u = { |
837 | .blkcipher = { | 832 | .blkcipher = { |
838 | .min_keysize = AES_MIN_KEY_SIZE, | 833 | .min_keysize = AES_MIN_KEY_SIZE, |
diff --git a/arch/s390/crypto/des_s390.c b/arch/s390/crypto/des_s390.c index 1eaa371ca3ee..b49fb96f4207 100644 --- a/arch/s390/crypto/des_s390.c +++ b/arch/s390/crypto/des_s390.c | |||
@@ -70,7 +70,6 @@ static struct crypto_alg des_alg = { | |||
70 | .cra_blocksize = DES_BLOCK_SIZE, | 70 | .cra_blocksize = DES_BLOCK_SIZE, |
71 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 71 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
72 | .cra_module = THIS_MODULE, | 72 | .cra_module = THIS_MODULE, |
73 | .cra_list = LIST_HEAD_INIT(des_alg.cra_list), | ||
74 | .cra_u = { | 73 | .cra_u = { |
75 | .cipher = { | 74 | .cipher = { |
76 | .cia_min_keysize = DES_KEY_SIZE, | 75 | .cia_min_keysize = DES_KEY_SIZE, |
@@ -163,7 +162,6 @@ static struct crypto_alg ecb_des_alg = { | |||
163 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 162 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
164 | .cra_type = &crypto_blkcipher_type, | 163 | .cra_type = &crypto_blkcipher_type, |
165 | .cra_module = THIS_MODULE, | 164 | .cra_module = THIS_MODULE, |
166 | .cra_list = LIST_HEAD_INIT(ecb_des_alg.cra_list), | ||
167 | .cra_u = { | 165 | .cra_u = { |
168 | .blkcipher = { | 166 | .blkcipher = { |
169 | .min_keysize = DES_KEY_SIZE, | 167 | .min_keysize = DES_KEY_SIZE, |
@@ -206,7 +204,6 @@ static struct crypto_alg cbc_des_alg = { | |||
206 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 204 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
207 | .cra_type = &crypto_blkcipher_type, | 205 | .cra_type = &crypto_blkcipher_type, |
208 | .cra_module = THIS_MODULE, | 206 | .cra_module = THIS_MODULE, |
209 | .cra_list = LIST_HEAD_INIT(cbc_des_alg.cra_list), | ||
210 | .cra_u = { | 207 | .cra_u = { |
211 | .blkcipher = { | 208 | .blkcipher = { |
212 | .min_keysize = DES_KEY_SIZE, | 209 | .min_keysize = DES_KEY_SIZE, |
@@ -271,7 +268,6 @@ static struct crypto_alg des3_alg = { | |||
271 | .cra_blocksize = DES_BLOCK_SIZE, | 268 | .cra_blocksize = DES_BLOCK_SIZE, |
272 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 269 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
273 | .cra_module = THIS_MODULE, | 270 | .cra_module = THIS_MODULE, |
274 | .cra_list = LIST_HEAD_INIT(des3_alg.cra_list), | ||
275 | .cra_u = { | 271 | .cra_u = { |
276 | .cipher = { | 272 | .cipher = { |
277 | .cia_min_keysize = DES3_KEY_SIZE, | 273 | .cia_min_keysize = DES3_KEY_SIZE, |
@@ -314,8 +310,6 @@ static struct crypto_alg ecb_des3_alg = { | |||
314 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 310 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
315 | .cra_type = &crypto_blkcipher_type, | 311 | .cra_type = &crypto_blkcipher_type, |
316 | .cra_module = THIS_MODULE, | 312 | .cra_module = THIS_MODULE, |
317 | .cra_list = LIST_HEAD_INIT( | ||
318 | ecb_des3_alg.cra_list), | ||
319 | .cra_u = { | 313 | .cra_u = { |
320 | .blkcipher = { | 314 | .blkcipher = { |
321 | .min_keysize = DES3_KEY_SIZE, | 315 | .min_keysize = DES3_KEY_SIZE, |
@@ -358,8 +352,6 @@ static struct crypto_alg cbc_des3_alg = { | |||
358 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 352 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
359 | .cra_type = &crypto_blkcipher_type, | 353 | .cra_type = &crypto_blkcipher_type, |
360 | .cra_module = THIS_MODULE, | 354 | .cra_module = THIS_MODULE, |
361 | .cra_list = LIST_HEAD_INIT( | ||
362 | cbc_des3_alg.cra_list), | ||
363 | .cra_u = { | 355 | .cra_u = { |
364 | .blkcipher = { | 356 | .blkcipher = { |
365 | .min_keysize = DES3_KEY_SIZE, | 357 | .min_keysize = DES3_KEY_SIZE, |
@@ -452,7 +444,6 @@ static struct crypto_alg ctr_des_alg = { | |||
452 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 444 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
453 | .cra_type = &crypto_blkcipher_type, | 445 | .cra_type = &crypto_blkcipher_type, |
454 | .cra_module = THIS_MODULE, | 446 | .cra_module = THIS_MODULE, |
455 | .cra_list = LIST_HEAD_INIT(ctr_des_alg.cra_list), | ||
456 | .cra_u = { | 447 | .cra_u = { |
457 | .blkcipher = { | 448 | .blkcipher = { |
458 | .min_keysize = DES_KEY_SIZE, | 449 | .min_keysize = DES_KEY_SIZE, |
@@ -496,7 +487,6 @@ static struct crypto_alg ctr_des3_alg = { | |||
496 | .cra_ctxsize = sizeof(struct s390_des_ctx), | 487 | .cra_ctxsize = sizeof(struct s390_des_ctx), |
497 | .cra_type = &crypto_blkcipher_type, | 488 | .cra_type = &crypto_blkcipher_type, |
498 | .cra_module = THIS_MODULE, | 489 | .cra_module = THIS_MODULE, |
499 | .cra_list = LIST_HEAD_INIT(ctr_des3_alg.cra_list), | ||
500 | .cra_u = { | 490 | .cra_u = { |
501 | .blkcipher = { | 491 | .blkcipher = { |
502 | .min_keysize = DES3_KEY_SIZE, | 492 | .min_keysize = DES3_KEY_SIZE, |
diff --git a/arch/s390/crypto/ghash_s390.c b/arch/s390/crypto/ghash_s390.c index b1bd170f24b1..1ebd3a15cca4 100644 --- a/arch/s390/crypto/ghash_s390.c +++ b/arch/s390/crypto/ghash_s390.c | |||
@@ -135,7 +135,6 @@ static struct shash_alg ghash_alg = { | |||
135 | .cra_blocksize = GHASH_BLOCK_SIZE, | 135 | .cra_blocksize = GHASH_BLOCK_SIZE, |
136 | .cra_ctxsize = sizeof(struct ghash_ctx), | 136 | .cra_ctxsize = sizeof(struct ghash_ctx), |
137 | .cra_module = THIS_MODULE, | 137 | .cra_module = THIS_MODULE, |
138 | .cra_list = LIST_HEAD_INIT(ghash_alg.base.cra_list), | ||
139 | }, | 138 | }, |
140 | }; | 139 | }; |
141 | 140 | ||