diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2012-07-11 07:20:51 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-08-01 05:47:27 -0400 |
commit | 7af6c2456851eb08d51d95de38ae8302994031e9 (patch) | |
tree | 15d314a6ff2e673026cc312a29e84de0ed0a2969 /arch/x86 | |
parent | 77ec2e734d4820c51cbabe1257e9311df5868160 (diff) |
crypto: arch/x86 - cleanup - remove unneeded crypto_alg.cra_list initializations
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/x86/crypto/'.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/crypto/aes_glue.c | 1 | ||||
-rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 5 | ||||
-rw-r--r-- | arch/x86/crypto/blowfish_glue.c | 4 | ||||
-rw-r--r-- | arch/x86/crypto/camellia_glue.c | 6 | ||||
-rw-r--r-- | arch/x86/crypto/ghash-clmulni-intel_glue.c | 2 | ||||
-rw-r--r-- | arch/x86/crypto/salsa20_glue.c | 1 | ||||
-rw-r--r-- | arch/x86/crypto/serpent_avx_glue.c | 10 | ||||
-rw-r--r-- | arch/x86/crypto/serpent_sse2_glue.c | 10 | ||||
-rw-r--r-- | arch/x86/crypto/twofish_avx_glue.c | 10 | ||||
-rw-r--r-- | arch/x86/crypto/twofish_glue.c | 1 | ||||
-rw-r--r-- | arch/x86/crypto/twofish_glue_3way.c | 5 |
11 files changed, 1 insertions, 54 deletions
diff --git a/arch/x86/crypto/aes_glue.c b/arch/x86/crypto/aes_glue.c index 59b37deb8c8d..aafe8ce0d65d 100644 --- a/arch/x86/crypto/aes_glue.c +++ b/arch/x86/crypto/aes_glue.c | |||
@@ -40,7 +40,6 @@ static struct crypto_alg aes_alg = { | |||
40 | .cra_blocksize = AES_BLOCK_SIZE, | 40 | .cra_blocksize = AES_BLOCK_SIZE, |
41 | .cra_ctxsize = sizeof(struct crypto_aes_ctx), | 41 | .cra_ctxsize = sizeof(struct crypto_aes_ctx), |
42 | .cra_module = THIS_MODULE, | 42 | .cra_module = THIS_MODULE, |
43 | .cra_list = LIST_HEAD_INIT(aes_alg.cra_list), | ||
44 | .cra_u = { | 43 | .cra_u = { |
45 | .cipher = { | 44 | .cipher = { |
46 | .cia_min_keysize = AES_MIN_KEY_SIZE, | 45 | .cia_min_keysize = AES_MIN_KEY_SIZE, |
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 34fdcff4d2c8..648347a05773 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -1118,7 +1118,7 @@ MODULE_DEVICE_TABLE(x86cpu, aesni_cpu_id); | |||
1118 | 1118 | ||
1119 | static int __init aesni_init(void) | 1119 | static int __init aesni_init(void) |
1120 | { | 1120 | { |
1121 | int err, i; | 1121 | int err; |
1122 | 1122 | ||
1123 | if (!x86_match_cpu(aesni_cpu_id)) | 1123 | if (!x86_match_cpu(aesni_cpu_id)) |
1124 | return -ENODEV; | 1124 | return -ENODEV; |
@@ -1127,9 +1127,6 @@ static int __init aesni_init(void) | |||
1127 | if (err) | 1127 | if (err) |
1128 | return err; | 1128 | return err; |
1129 | 1129 | ||
1130 | for (i = 0; i < ARRAY_SIZE(aesni_algs); i++) | ||
1131 | INIT_LIST_HEAD(&aesni_algs[i].cra_list); | ||
1132 | |||
1133 | return crypto_register_algs(aesni_algs, ARRAY_SIZE(aesni_algs)); | 1130 | return crypto_register_algs(aesni_algs, ARRAY_SIZE(aesni_algs)); |
1134 | } | 1131 | } |
1135 | 1132 | ||
diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c index 7967474de8f7..50ec333b70e6 100644 --- a/arch/x86/crypto/blowfish_glue.c +++ b/arch/x86/crypto/blowfish_glue.c | |||
@@ -367,7 +367,6 @@ static struct crypto_alg bf_algs[4] = { { | |||
367 | .cra_ctxsize = sizeof(struct bf_ctx), | 367 | .cra_ctxsize = sizeof(struct bf_ctx), |
368 | .cra_alignmask = 0, | 368 | .cra_alignmask = 0, |
369 | .cra_module = THIS_MODULE, | 369 | .cra_module = THIS_MODULE, |
370 | .cra_list = LIST_HEAD_INIT(bf_algs[0].cra_list), | ||
371 | .cra_u = { | 370 | .cra_u = { |
372 | .cipher = { | 371 | .cipher = { |
373 | .cia_min_keysize = BF_MIN_KEY_SIZE, | 372 | .cia_min_keysize = BF_MIN_KEY_SIZE, |
@@ -387,7 +386,6 @@ static struct crypto_alg bf_algs[4] = { { | |||
387 | .cra_alignmask = 0, | 386 | .cra_alignmask = 0, |
388 | .cra_type = &crypto_blkcipher_type, | 387 | .cra_type = &crypto_blkcipher_type, |
389 | .cra_module = THIS_MODULE, | 388 | .cra_module = THIS_MODULE, |
390 | .cra_list = LIST_HEAD_INIT(bf_algs[1].cra_list), | ||
391 | .cra_u = { | 389 | .cra_u = { |
392 | .blkcipher = { | 390 | .blkcipher = { |
393 | .min_keysize = BF_MIN_KEY_SIZE, | 391 | .min_keysize = BF_MIN_KEY_SIZE, |
@@ -407,7 +405,6 @@ static struct crypto_alg bf_algs[4] = { { | |||
407 | .cra_alignmask = 0, | 405 | .cra_alignmask = 0, |
408 | .cra_type = &crypto_blkcipher_type, | 406 | .cra_type = &crypto_blkcipher_type, |
409 | .cra_module = THIS_MODULE, | 407 | .cra_module = THIS_MODULE, |
410 | .cra_list = LIST_HEAD_INIT(bf_algs[2].cra_list), | ||
411 | .cra_u = { | 408 | .cra_u = { |
412 | .blkcipher = { | 409 | .blkcipher = { |
413 | .min_keysize = BF_MIN_KEY_SIZE, | 410 | .min_keysize = BF_MIN_KEY_SIZE, |
@@ -428,7 +425,6 @@ static struct crypto_alg bf_algs[4] = { { | |||
428 | .cra_alignmask = 0, | 425 | .cra_alignmask = 0, |
429 | .cra_type = &crypto_blkcipher_type, | 426 | .cra_type = &crypto_blkcipher_type, |
430 | .cra_module = THIS_MODULE, | 427 | .cra_module = THIS_MODULE, |
431 | .cra_list = LIST_HEAD_INIT(bf_algs[3].cra_list), | ||
432 | .cra_u = { | 428 | .cra_u = { |
433 | .blkcipher = { | 429 | .blkcipher = { |
434 | .min_keysize = BF_MIN_KEY_SIZE, | 430 | .min_keysize = BF_MIN_KEY_SIZE, |
diff --git a/arch/x86/crypto/camellia_glue.c b/arch/x86/crypto/camellia_glue.c index eeb2b3b743e9..7a74d7bb326d 100644 --- a/arch/x86/crypto/camellia_glue.c +++ b/arch/x86/crypto/camellia_glue.c | |||
@@ -1601,7 +1601,6 @@ static struct crypto_alg camellia_algs[6] = { { | |||
1601 | .cra_ctxsize = sizeof(struct camellia_ctx), | 1601 | .cra_ctxsize = sizeof(struct camellia_ctx), |
1602 | .cra_alignmask = 0, | 1602 | .cra_alignmask = 0, |
1603 | .cra_module = THIS_MODULE, | 1603 | .cra_module = THIS_MODULE, |
1604 | .cra_list = LIST_HEAD_INIT(camellia_algs[0].cra_list), | ||
1605 | .cra_u = { | 1604 | .cra_u = { |
1606 | .cipher = { | 1605 | .cipher = { |
1607 | .cia_min_keysize = CAMELLIA_MIN_KEY_SIZE, | 1606 | .cia_min_keysize = CAMELLIA_MIN_KEY_SIZE, |
@@ -1621,7 +1620,6 @@ static struct crypto_alg camellia_algs[6] = { { | |||
1621 | .cra_alignmask = 0, | 1620 | .cra_alignmask = 0, |
1622 | .cra_type = &crypto_blkcipher_type, | 1621 | .cra_type = &crypto_blkcipher_type, |
1623 | .cra_module = THIS_MODULE, | 1622 | .cra_module = THIS_MODULE, |
1624 | .cra_list = LIST_HEAD_INIT(camellia_algs[1].cra_list), | ||
1625 | .cra_u = { | 1623 | .cra_u = { |
1626 | .blkcipher = { | 1624 | .blkcipher = { |
1627 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, | 1625 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, |
@@ -1641,7 +1639,6 @@ static struct crypto_alg camellia_algs[6] = { { | |||
1641 | .cra_alignmask = 0, | 1639 | .cra_alignmask = 0, |
1642 | .cra_type = &crypto_blkcipher_type, | 1640 | .cra_type = &crypto_blkcipher_type, |
1643 | .cra_module = THIS_MODULE, | 1641 | .cra_module = THIS_MODULE, |
1644 | .cra_list = LIST_HEAD_INIT(camellia_algs[2].cra_list), | ||
1645 | .cra_u = { | 1642 | .cra_u = { |
1646 | .blkcipher = { | 1643 | .blkcipher = { |
1647 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, | 1644 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, |
@@ -1662,7 +1659,6 @@ static struct crypto_alg camellia_algs[6] = { { | |||
1662 | .cra_alignmask = 0, | 1659 | .cra_alignmask = 0, |
1663 | .cra_type = &crypto_blkcipher_type, | 1660 | .cra_type = &crypto_blkcipher_type, |
1664 | .cra_module = THIS_MODULE, | 1661 | .cra_module = THIS_MODULE, |
1665 | .cra_list = LIST_HEAD_INIT(camellia_algs[3].cra_list), | ||
1666 | .cra_u = { | 1662 | .cra_u = { |
1667 | .blkcipher = { | 1663 | .blkcipher = { |
1668 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, | 1664 | .min_keysize = CAMELLIA_MIN_KEY_SIZE, |
@@ -1683,7 +1679,6 @@ static struct crypto_alg camellia_algs[6] = { { | |||
1683 | .cra_alignmask = 0, | 1679 | .cra_alignmask = 0, |
1684 | .cra_type = &crypto_blkcipher_type, | 1680 | .cra_type = &crypto_blkcipher_type, |
1685 | .cra_module = THIS_MODULE, | 1681 | .cra_module = THIS_MODULE, |
1686 | .cra_list = LIST_HEAD_INIT(camellia_algs[4].cra_list), | ||
1687 | .cra_exit = lrw_exit_tfm, | 1682 | .cra_exit = lrw_exit_tfm, |
1688 | .cra_u = { | 1683 | .cra_u = { |
1689 | .blkcipher = { | 1684 | .blkcipher = { |
@@ -1707,7 +1702,6 @@ static struct crypto_alg camellia_algs[6] = { { | |||
1707 | .cra_alignmask = 0, | 1702 | .cra_alignmask = 0, |
1708 | .cra_type = &crypto_blkcipher_type, | 1703 | .cra_type = &crypto_blkcipher_type, |
1709 | .cra_module = THIS_MODULE, | 1704 | .cra_module = THIS_MODULE, |
1710 | .cra_list = LIST_HEAD_INIT(camellia_algs[5].cra_list), | ||
1711 | .cra_u = { | 1705 | .cra_u = { |
1712 | .blkcipher = { | 1706 | .blkcipher = { |
1713 | .min_keysize = CAMELLIA_MIN_KEY_SIZE * 2, | 1707 | .min_keysize = CAMELLIA_MIN_KEY_SIZE * 2, |
diff --git a/arch/x86/crypto/ghash-clmulni-intel_glue.c b/arch/x86/crypto/ghash-clmulni-intel_glue.c index b4bf0a63b520..6759dd1135be 100644 --- a/arch/x86/crypto/ghash-clmulni-intel_glue.c +++ b/arch/x86/crypto/ghash-clmulni-intel_glue.c | |||
@@ -150,7 +150,6 @@ static struct shash_alg ghash_alg = { | |||
150 | .cra_blocksize = GHASH_BLOCK_SIZE, | 150 | .cra_blocksize = GHASH_BLOCK_SIZE, |
151 | .cra_ctxsize = sizeof(struct ghash_ctx), | 151 | .cra_ctxsize = sizeof(struct ghash_ctx), |
152 | .cra_module = THIS_MODULE, | 152 | .cra_module = THIS_MODULE, |
153 | .cra_list = LIST_HEAD_INIT(ghash_alg.base.cra_list), | ||
154 | }, | 153 | }, |
155 | }; | 154 | }; |
156 | 155 | ||
@@ -288,7 +287,6 @@ static struct ahash_alg ghash_async_alg = { | |||
288 | .cra_blocksize = GHASH_BLOCK_SIZE, | 287 | .cra_blocksize = GHASH_BLOCK_SIZE, |
289 | .cra_type = &crypto_ahash_type, | 288 | .cra_type = &crypto_ahash_type, |
290 | .cra_module = THIS_MODULE, | 289 | .cra_module = THIS_MODULE, |
291 | .cra_list = LIST_HEAD_INIT(ghash_async_alg.halg.base.cra_list), | ||
292 | .cra_init = ghash_async_init_tfm, | 290 | .cra_init = ghash_async_init_tfm, |
293 | .cra_exit = ghash_async_exit_tfm, | 291 | .cra_exit = ghash_async_exit_tfm, |
294 | }, | 292 | }, |
diff --git a/arch/x86/crypto/salsa20_glue.c b/arch/x86/crypto/salsa20_glue.c index bccb76d80987..a3a3c0205c16 100644 --- a/arch/x86/crypto/salsa20_glue.c +++ b/arch/x86/crypto/salsa20_glue.c | |||
@@ -97,7 +97,6 @@ static struct crypto_alg alg = { | |||
97 | .cra_ctxsize = sizeof(struct salsa20_ctx), | 97 | .cra_ctxsize = sizeof(struct salsa20_ctx), |
98 | .cra_alignmask = 3, | 98 | .cra_alignmask = 3, |
99 | .cra_module = THIS_MODULE, | 99 | .cra_module = THIS_MODULE, |
100 | .cra_list = LIST_HEAD_INIT(alg.cra_list), | ||
101 | .cra_u = { | 100 | .cra_u = { |
102 | .blkcipher = { | 101 | .blkcipher = { |
103 | .setkey = setkey, | 102 | .setkey = setkey, |
diff --git a/arch/x86/crypto/serpent_avx_glue.c b/arch/x86/crypto/serpent_avx_glue.c index b36bdac237eb..3f543a04cf1e 100644 --- a/arch/x86/crypto/serpent_avx_glue.c +++ b/arch/x86/crypto/serpent_avx_glue.c | |||
@@ -390,7 +390,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
390 | .cra_alignmask = 0, | 390 | .cra_alignmask = 0, |
391 | .cra_type = &crypto_blkcipher_type, | 391 | .cra_type = &crypto_blkcipher_type, |
392 | .cra_module = THIS_MODULE, | 392 | .cra_module = THIS_MODULE, |
393 | .cra_list = LIST_HEAD_INIT(serpent_algs[0].cra_list), | ||
394 | .cra_u = { | 393 | .cra_u = { |
395 | .blkcipher = { | 394 | .blkcipher = { |
396 | .min_keysize = SERPENT_MIN_KEY_SIZE, | 395 | .min_keysize = SERPENT_MIN_KEY_SIZE, |
@@ -410,7 +409,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
410 | .cra_alignmask = 0, | 409 | .cra_alignmask = 0, |
411 | .cra_type = &crypto_blkcipher_type, | 410 | .cra_type = &crypto_blkcipher_type, |
412 | .cra_module = THIS_MODULE, | 411 | .cra_module = THIS_MODULE, |
413 | .cra_list = LIST_HEAD_INIT(serpent_algs[1].cra_list), | ||
414 | .cra_u = { | 412 | .cra_u = { |
415 | .blkcipher = { | 413 | .blkcipher = { |
416 | .min_keysize = SERPENT_MIN_KEY_SIZE, | 414 | .min_keysize = SERPENT_MIN_KEY_SIZE, |
@@ -430,7 +428,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
430 | .cra_alignmask = 0, | 428 | .cra_alignmask = 0, |
431 | .cra_type = &crypto_blkcipher_type, | 429 | .cra_type = &crypto_blkcipher_type, |
432 | .cra_module = THIS_MODULE, | 430 | .cra_module = THIS_MODULE, |
433 | .cra_list = LIST_HEAD_INIT(serpent_algs[2].cra_list), | ||
434 | .cra_u = { | 431 | .cra_u = { |
435 | .blkcipher = { | 432 | .blkcipher = { |
436 | .min_keysize = SERPENT_MIN_KEY_SIZE, | 433 | .min_keysize = SERPENT_MIN_KEY_SIZE, |
@@ -451,7 +448,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
451 | .cra_alignmask = 0, | 448 | .cra_alignmask = 0, |
452 | .cra_type = &crypto_blkcipher_type, | 449 | .cra_type = &crypto_blkcipher_type, |
453 | .cra_module = THIS_MODULE, | 450 | .cra_module = THIS_MODULE, |
454 | .cra_list = LIST_HEAD_INIT(serpent_algs[3].cra_list), | ||
455 | .cra_exit = lrw_exit_tfm, | 451 | .cra_exit = lrw_exit_tfm, |
456 | .cra_u = { | 452 | .cra_u = { |
457 | .blkcipher = { | 453 | .blkcipher = { |
@@ -475,7 +471,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
475 | .cra_alignmask = 0, | 471 | .cra_alignmask = 0, |
476 | .cra_type = &crypto_blkcipher_type, | 472 | .cra_type = &crypto_blkcipher_type, |
477 | .cra_module = THIS_MODULE, | 473 | .cra_module = THIS_MODULE, |
478 | .cra_list = LIST_HEAD_INIT(serpent_algs[4].cra_list), | ||
479 | .cra_u = { | 474 | .cra_u = { |
480 | .blkcipher = { | 475 | .blkcipher = { |
481 | .min_keysize = SERPENT_MIN_KEY_SIZE * 2, | 476 | .min_keysize = SERPENT_MIN_KEY_SIZE * 2, |
@@ -496,7 +491,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
496 | .cra_alignmask = 0, | 491 | .cra_alignmask = 0, |
497 | .cra_type = &crypto_ablkcipher_type, | 492 | .cra_type = &crypto_ablkcipher_type, |
498 | .cra_module = THIS_MODULE, | 493 | .cra_module = THIS_MODULE, |
499 | .cra_list = LIST_HEAD_INIT(serpent_algs[5].cra_list), | ||
500 | .cra_init = ablk_init, | 494 | .cra_init = ablk_init, |
501 | .cra_exit = ablk_exit, | 495 | .cra_exit = ablk_exit, |
502 | .cra_u = { | 496 | .cra_u = { |
@@ -518,7 +512,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
518 | .cra_alignmask = 0, | 512 | .cra_alignmask = 0, |
519 | .cra_type = &crypto_ablkcipher_type, | 513 | .cra_type = &crypto_ablkcipher_type, |
520 | .cra_module = THIS_MODULE, | 514 | .cra_module = THIS_MODULE, |
521 | .cra_list = LIST_HEAD_INIT(serpent_algs[6].cra_list), | ||
522 | .cra_init = ablk_init, | 515 | .cra_init = ablk_init, |
523 | .cra_exit = ablk_exit, | 516 | .cra_exit = ablk_exit, |
524 | .cra_u = { | 517 | .cra_u = { |
@@ -541,7 +534,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
541 | .cra_alignmask = 0, | 534 | .cra_alignmask = 0, |
542 | .cra_type = &crypto_ablkcipher_type, | 535 | .cra_type = &crypto_ablkcipher_type, |
543 | .cra_module = THIS_MODULE, | 536 | .cra_module = THIS_MODULE, |
544 | .cra_list = LIST_HEAD_INIT(serpent_algs[7].cra_list), | ||
545 | .cra_init = ablk_init, | 537 | .cra_init = ablk_init, |
546 | .cra_exit = ablk_exit, | 538 | .cra_exit = ablk_exit, |
547 | .cra_u = { | 539 | .cra_u = { |
@@ -565,7 +557,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
565 | .cra_alignmask = 0, | 557 | .cra_alignmask = 0, |
566 | .cra_type = &crypto_ablkcipher_type, | 558 | .cra_type = &crypto_ablkcipher_type, |
567 | .cra_module = THIS_MODULE, | 559 | .cra_module = THIS_MODULE, |
568 | .cra_list = LIST_HEAD_INIT(serpent_algs[8].cra_list), | ||
569 | .cra_init = ablk_init, | 560 | .cra_init = ablk_init, |
570 | .cra_exit = ablk_exit, | 561 | .cra_exit = ablk_exit, |
571 | .cra_u = { | 562 | .cra_u = { |
@@ -590,7 +581,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
590 | .cra_alignmask = 0, | 581 | .cra_alignmask = 0, |
591 | .cra_type = &crypto_ablkcipher_type, | 582 | .cra_type = &crypto_ablkcipher_type, |
592 | .cra_module = THIS_MODULE, | 583 | .cra_module = THIS_MODULE, |
593 | .cra_list = LIST_HEAD_INIT(serpent_algs[9].cra_list), | ||
594 | .cra_init = ablk_init, | 584 | .cra_init = ablk_init, |
595 | .cra_exit = ablk_exit, | 585 | .cra_exit = ablk_exit, |
596 | .cra_u = { | 586 | .cra_u = { |
diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c index d679c8675f4a..9107a9908c41 100644 --- a/arch/x86/crypto/serpent_sse2_glue.c +++ b/arch/x86/crypto/serpent_sse2_glue.c | |||
@@ -393,7 +393,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
393 | .cra_alignmask = 0, | 393 | .cra_alignmask = 0, |
394 | .cra_type = &crypto_blkcipher_type, | 394 | .cra_type = &crypto_blkcipher_type, |
395 | .cra_module = THIS_MODULE, | 395 | .cra_module = THIS_MODULE, |
396 | .cra_list = LIST_HEAD_INIT(serpent_algs[0].cra_list), | ||
397 | .cra_u = { | 396 | .cra_u = { |
398 | .blkcipher = { | 397 | .blkcipher = { |
399 | .min_keysize = SERPENT_MIN_KEY_SIZE, | 398 | .min_keysize = SERPENT_MIN_KEY_SIZE, |
@@ -413,7 +412,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
413 | .cra_alignmask = 0, | 412 | .cra_alignmask = 0, |
414 | .cra_type = &crypto_blkcipher_type, | 413 | .cra_type = &crypto_blkcipher_type, |
415 | .cra_module = THIS_MODULE, | 414 | .cra_module = THIS_MODULE, |
416 | .cra_list = LIST_HEAD_INIT(serpent_algs[1].cra_list), | ||
417 | .cra_u = { | 415 | .cra_u = { |
418 | .blkcipher = { | 416 | .blkcipher = { |
419 | .min_keysize = SERPENT_MIN_KEY_SIZE, | 417 | .min_keysize = SERPENT_MIN_KEY_SIZE, |
@@ -433,7 +431,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
433 | .cra_alignmask = 0, | 431 | .cra_alignmask = 0, |
434 | .cra_type = &crypto_blkcipher_type, | 432 | .cra_type = &crypto_blkcipher_type, |
435 | .cra_module = THIS_MODULE, | 433 | .cra_module = THIS_MODULE, |
436 | .cra_list = LIST_HEAD_INIT(serpent_algs[2].cra_list), | ||
437 | .cra_u = { | 434 | .cra_u = { |
438 | .blkcipher = { | 435 | .blkcipher = { |
439 | .min_keysize = SERPENT_MIN_KEY_SIZE, | 436 | .min_keysize = SERPENT_MIN_KEY_SIZE, |
@@ -454,7 +451,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
454 | .cra_alignmask = 0, | 451 | .cra_alignmask = 0, |
455 | .cra_type = &crypto_blkcipher_type, | 452 | .cra_type = &crypto_blkcipher_type, |
456 | .cra_module = THIS_MODULE, | 453 | .cra_module = THIS_MODULE, |
457 | .cra_list = LIST_HEAD_INIT(serpent_algs[3].cra_list), | ||
458 | .cra_exit = lrw_exit_tfm, | 454 | .cra_exit = lrw_exit_tfm, |
459 | .cra_u = { | 455 | .cra_u = { |
460 | .blkcipher = { | 456 | .blkcipher = { |
@@ -478,7 +474,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
478 | .cra_alignmask = 0, | 474 | .cra_alignmask = 0, |
479 | .cra_type = &crypto_blkcipher_type, | 475 | .cra_type = &crypto_blkcipher_type, |
480 | .cra_module = THIS_MODULE, | 476 | .cra_module = THIS_MODULE, |
481 | .cra_list = LIST_HEAD_INIT(serpent_algs[4].cra_list), | ||
482 | .cra_u = { | 477 | .cra_u = { |
483 | .blkcipher = { | 478 | .blkcipher = { |
484 | .min_keysize = SERPENT_MIN_KEY_SIZE * 2, | 479 | .min_keysize = SERPENT_MIN_KEY_SIZE * 2, |
@@ -499,7 +494,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
499 | .cra_alignmask = 0, | 494 | .cra_alignmask = 0, |
500 | .cra_type = &crypto_ablkcipher_type, | 495 | .cra_type = &crypto_ablkcipher_type, |
501 | .cra_module = THIS_MODULE, | 496 | .cra_module = THIS_MODULE, |
502 | .cra_list = LIST_HEAD_INIT(serpent_algs[5].cra_list), | ||
503 | .cra_init = ablk_init, | 497 | .cra_init = ablk_init, |
504 | .cra_exit = ablk_exit, | 498 | .cra_exit = ablk_exit, |
505 | .cra_u = { | 499 | .cra_u = { |
@@ -521,7 +515,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
521 | .cra_alignmask = 0, | 515 | .cra_alignmask = 0, |
522 | .cra_type = &crypto_ablkcipher_type, | 516 | .cra_type = &crypto_ablkcipher_type, |
523 | .cra_module = THIS_MODULE, | 517 | .cra_module = THIS_MODULE, |
524 | .cra_list = LIST_HEAD_INIT(serpent_algs[6].cra_list), | ||
525 | .cra_init = ablk_init, | 518 | .cra_init = ablk_init, |
526 | .cra_exit = ablk_exit, | 519 | .cra_exit = ablk_exit, |
527 | .cra_u = { | 520 | .cra_u = { |
@@ -544,7 +537,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
544 | .cra_alignmask = 0, | 537 | .cra_alignmask = 0, |
545 | .cra_type = &crypto_ablkcipher_type, | 538 | .cra_type = &crypto_ablkcipher_type, |
546 | .cra_module = THIS_MODULE, | 539 | .cra_module = THIS_MODULE, |
547 | .cra_list = LIST_HEAD_INIT(serpent_algs[7].cra_list), | ||
548 | .cra_init = ablk_init, | 540 | .cra_init = ablk_init, |
549 | .cra_exit = ablk_exit, | 541 | .cra_exit = ablk_exit, |
550 | .cra_u = { | 542 | .cra_u = { |
@@ -568,7 +560,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
568 | .cra_alignmask = 0, | 560 | .cra_alignmask = 0, |
569 | .cra_type = &crypto_ablkcipher_type, | 561 | .cra_type = &crypto_ablkcipher_type, |
570 | .cra_module = THIS_MODULE, | 562 | .cra_module = THIS_MODULE, |
571 | .cra_list = LIST_HEAD_INIT(serpent_algs[8].cra_list), | ||
572 | .cra_init = ablk_init, | 563 | .cra_init = ablk_init, |
573 | .cra_exit = ablk_exit, | 564 | .cra_exit = ablk_exit, |
574 | .cra_u = { | 565 | .cra_u = { |
@@ -593,7 +584,6 @@ static struct crypto_alg serpent_algs[10] = { { | |||
593 | .cra_alignmask = 0, | 584 | .cra_alignmask = 0, |
594 | .cra_type = &crypto_ablkcipher_type, | 585 | .cra_type = &crypto_ablkcipher_type, |
595 | .cra_module = THIS_MODULE, | 586 | .cra_module = THIS_MODULE, |
596 | .cra_list = LIST_HEAD_INIT(serpent_algs[9].cra_list), | ||
597 | .cra_init = ablk_init, | 587 | .cra_init = ablk_init, |
598 | .cra_exit = ablk_exit, | 588 | .cra_exit = ablk_exit, |
599 | .cra_u = { | 589 | .cra_u = { |
diff --git a/arch/x86/crypto/twofish_avx_glue.c b/arch/x86/crypto/twofish_avx_glue.c index 782b67ddaf6a..e7708b5442e0 100644 --- a/arch/x86/crypto/twofish_avx_glue.c +++ b/arch/x86/crypto/twofish_avx_glue.c | |||
@@ -378,7 +378,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
378 | .cra_alignmask = 0, | 378 | .cra_alignmask = 0, |
379 | .cra_type = &crypto_blkcipher_type, | 379 | .cra_type = &crypto_blkcipher_type, |
380 | .cra_module = THIS_MODULE, | 380 | .cra_module = THIS_MODULE, |
381 | .cra_list = LIST_HEAD_INIT(twofish_algs[0].cra_list), | ||
382 | .cra_u = { | 381 | .cra_u = { |
383 | .blkcipher = { | 382 | .blkcipher = { |
384 | .min_keysize = TF_MIN_KEY_SIZE, | 383 | .min_keysize = TF_MIN_KEY_SIZE, |
@@ -398,7 +397,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
398 | .cra_alignmask = 0, | 397 | .cra_alignmask = 0, |
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(twofish_algs[1].cra_list), | ||
402 | .cra_u = { | 400 | .cra_u = { |
403 | .blkcipher = { | 401 | .blkcipher = { |
404 | .min_keysize = TF_MIN_KEY_SIZE, | 402 | .min_keysize = TF_MIN_KEY_SIZE, |
@@ -418,7 +416,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
418 | .cra_alignmask = 0, | 416 | .cra_alignmask = 0, |
419 | .cra_type = &crypto_blkcipher_type, | 417 | .cra_type = &crypto_blkcipher_type, |
420 | .cra_module = THIS_MODULE, | 418 | .cra_module = THIS_MODULE, |
421 | .cra_list = LIST_HEAD_INIT(twofish_algs[2].cra_list), | ||
422 | .cra_u = { | 419 | .cra_u = { |
423 | .blkcipher = { | 420 | .blkcipher = { |
424 | .min_keysize = TF_MIN_KEY_SIZE, | 421 | .min_keysize = TF_MIN_KEY_SIZE, |
@@ -439,7 +436,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
439 | .cra_alignmask = 0, | 436 | .cra_alignmask = 0, |
440 | .cra_type = &crypto_blkcipher_type, | 437 | .cra_type = &crypto_blkcipher_type, |
441 | .cra_module = THIS_MODULE, | 438 | .cra_module = THIS_MODULE, |
442 | .cra_list = LIST_HEAD_INIT(twofish_algs[3].cra_list), | ||
443 | .cra_exit = lrw_twofish_exit_tfm, | 439 | .cra_exit = lrw_twofish_exit_tfm, |
444 | .cra_u = { | 440 | .cra_u = { |
445 | .blkcipher = { | 441 | .blkcipher = { |
@@ -463,7 +459,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
463 | .cra_alignmask = 0, | 459 | .cra_alignmask = 0, |
464 | .cra_type = &crypto_blkcipher_type, | 460 | .cra_type = &crypto_blkcipher_type, |
465 | .cra_module = THIS_MODULE, | 461 | .cra_module = THIS_MODULE, |
466 | .cra_list = LIST_HEAD_INIT(twofish_algs[4].cra_list), | ||
467 | .cra_u = { | 462 | .cra_u = { |
468 | .blkcipher = { | 463 | .blkcipher = { |
469 | .min_keysize = TF_MIN_KEY_SIZE * 2, | 464 | .min_keysize = TF_MIN_KEY_SIZE * 2, |
@@ -484,7 +479,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
484 | .cra_alignmask = 0, | 479 | .cra_alignmask = 0, |
485 | .cra_type = &crypto_ablkcipher_type, | 480 | .cra_type = &crypto_ablkcipher_type, |
486 | .cra_module = THIS_MODULE, | 481 | .cra_module = THIS_MODULE, |
487 | .cra_list = LIST_HEAD_INIT(twofish_algs[5].cra_list), | ||
488 | .cra_init = ablk_init, | 482 | .cra_init = ablk_init, |
489 | .cra_exit = ablk_exit, | 483 | .cra_exit = ablk_exit, |
490 | .cra_u = { | 484 | .cra_u = { |
@@ -506,7 +500,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
506 | .cra_alignmask = 0, | 500 | .cra_alignmask = 0, |
507 | .cra_type = &crypto_ablkcipher_type, | 501 | .cra_type = &crypto_ablkcipher_type, |
508 | .cra_module = THIS_MODULE, | 502 | .cra_module = THIS_MODULE, |
509 | .cra_list = LIST_HEAD_INIT(twofish_algs[6].cra_list), | ||
510 | .cra_init = ablk_init, | 503 | .cra_init = ablk_init, |
511 | .cra_exit = ablk_exit, | 504 | .cra_exit = ablk_exit, |
512 | .cra_u = { | 505 | .cra_u = { |
@@ -529,7 +522,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
529 | .cra_alignmask = 0, | 522 | .cra_alignmask = 0, |
530 | .cra_type = &crypto_ablkcipher_type, | 523 | .cra_type = &crypto_ablkcipher_type, |
531 | .cra_module = THIS_MODULE, | 524 | .cra_module = THIS_MODULE, |
532 | .cra_list = LIST_HEAD_INIT(twofish_algs[7].cra_list), | ||
533 | .cra_init = ablk_init, | 525 | .cra_init = ablk_init, |
534 | .cra_exit = ablk_exit, | 526 | .cra_exit = ablk_exit, |
535 | .cra_u = { | 527 | .cra_u = { |
@@ -553,7 +545,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
553 | .cra_alignmask = 0, | 545 | .cra_alignmask = 0, |
554 | .cra_type = &crypto_ablkcipher_type, | 546 | .cra_type = &crypto_ablkcipher_type, |
555 | .cra_module = THIS_MODULE, | 547 | .cra_module = THIS_MODULE, |
556 | .cra_list = LIST_HEAD_INIT(twofish_algs[8].cra_list), | ||
557 | .cra_init = ablk_init, | 548 | .cra_init = ablk_init, |
558 | .cra_exit = ablk_exit, | 549 | .cra_exit = ablk_exit, |
559 | .cra_u = { | 550 | .cra_u = { |
@@ -578,7 +569,6 @@ static struct crypto_alg twofish_algs[10] = { { | |||
578 | .cra_alignmask = 0, | 569 | .cra_alignmask = 0, |
579 | .cra_type = &crypto_ablkcipher_type, | 570 | .cra_type = &crypto_ablkcipher_type, |
580 | .cra_module = THIS_MODULE, | 571 | .cra_module = THIS_MODULE, |
581 | .cra_list = LIST_HEAD_INIT(twofish_algs[9].cra_list), | ||
582 | .cra_init = ablk_init, | 572 | .cra_init = ablk_init, |
583 | .cra_exit = ablk_exit, | 573 | .cra_exit = ablk_exit, |
584 | .cra_u = { | 574 | .cra_u = { |
diff --git a/arch/x86/crypto/twofish_glue.c b/arch/x86/crypto/twofish_glue.c index 359ae084275c..0a5202303501 100644 --- a/arch/x86/crypto/twofish_glue.c +++ b/arch/x86/crypto/twofish_glue.c | |||
@@ -70,7 +70,6 @@ static struct crypto_alg alg = { | |||
70 | .cra_ctxsize = sizeof(struct twofish_ctx), | 70 | .cra_ctxsize = sizeof(struct twofish_ctx), |
71 | .cra_alignmask = 0, | 71 | .cra_alignmask = 0, |
72 | .cra_module = THIS_MODULE, | 72 | .cra_module = THIS_MODULE, |
73 | .cra_list = LIST_HEAD_INIT(alg.cra_list), | ||
74 | .cra_u = { | 73 | .cra_u = { |
75 | .cipher = { | 74 | .cipher = { |
76 | .cia_min_keysize = TF_MIN_KEY_SIZE, | 75 | .cia_min_keysize = TF_MIN_KEY_SIZE, |
diff --git a/arch/x86/crypto/twofish_glue_3way.c b/arch/x86/crypto/twofish_glue_3way.c index 15f9347316c8..aa3eb358b7e8 100644 --- a/arch/x86/crypto/twofish_glue_3way.c +++ b/arch/x86/crypto/twofish_glue_3way.c | |||
@@ -342,7 +342,6 @@ static struct crypto_alg tf_algs[5] = { { | |||
342 | .cra_alignmask = 0, | 342 | .cra_alignmask = 0, |
343 | .cra_type = &crypto_blkcipher_type, | 343 | .cra_type = &crypto_blkcipher_type, |
344 | .cra_module = THIS_MODULE, | 344 | .cra_module = THIS_MODULE, |
345 | .cra_list = LIST_HEAD_INIT(tf_algs[0].cra_list), | ||
346 | .cra_u = { | 345 | .cra_u = { |
347 | .blkcipher = { | 346 | .blkcipher = { |
348 | .min_keysize = TF_MIN_KEY_SIZE, | 347 | .min_keysize = TF_MIN_KEY_SIZE, |
@@ -362,7 +361,6 @@ static struct crypto_alg tf_algs[5] = { { | |||
362 | .cra_alignmask = 0, | 361 | .cra_alignmask = 0, |
363 | .cra_type = &crypto_blkcipher_type, | 362 | .cra_type = &crypto_blkcipher_type, |
364 | .cra_module = THIS_MODULE, | 363 | .cra_module = THIS_MODULE, |
365 | .cra_list = LIST_HEAD_INIT(tf_algs[1].cra_list), | ||
366 | .cra_u = { | 364 | .cra_u = { |
367 | .blkcipher = { | 365 | .blkcipher = { |
368 | .min_keysize = TF_MIN_KEY_SIZE, | 366 | .min_keysize = TF_MIN_KEY_SIZE, |
@@ -383,7 +381,6 @@ static struct crypto_alg tf_algs[5] = { { | |||
383 | .cra_alignmask = 0, | 381 | .cra_alignmask = 0, |
384 | .cra_type = &crypto_blkcipher_type, | 382 | .cra_type = &crypto_blkcipher_type, |
385 | .cra_module = THIS_MODULE, | 383 | .cra_module = THIS_MODULE, |
386 | .cra_list = LIST_HEAD_INIT(tf_algs[2].cra_list), | ||
387 | .cra_u = { | 384 | .cra_u = { |
388 | .blkcipher = { | 385 | .blkcipher = { |
389 | .min_keysize = TF_MIN_KEY_SIZE, | 386 | .min_keysize = TF_MIN_KEY_SIZE, |
@@ -404,7 +401,6 @@ static struct crypto_alg tf_algs[5] = { { | |||
404 | .cra_alignmask = 0, | 401 | .cra_alignmask = 0, |
405 | .cra_type = &crypto_blkcipher_type, | 402 | .cra_type = &crypto_blkcipher_type, |
406 | .cra_module = THIS_MODULE, | 403 | .cra_module = THIS_MODULE, |
407 | .cra_list = LIST_HEAD_INIT(tf_algs[3].cra_list), | ||
408 | .cra_exit = lrw_twofish_exit_tfm, | 404 | .cra_exit = lrw_twofish_exit_tfm, |
409 | .cra_u = { | 405 | .cra_u = { |
410 | .blkcipher = { | 406 | .blkcipher = { |
@@ -426,7 +422,6 @@ static struct crypto_alg tf_algs[5] = { { | |||
426 | .cra_alignmask = 0, | 422 | .cra_alignmask = 0, |
427 | .cra_type = &crypto_blkcipher_type, | 423 | .cra_type = &crypto_blkcipher_type, |
428 | .cra_module = THIS_MODULE, | 424 | .cra_module = THIS_MODULE, |
429 | .cra_list = LIST_HEAD_INIT(tf_algs[4].cra_list), | ||
430 | .cra_u = { | 425 | .cra_u = { |
431 | .blkcipher = { | 426 | .blkcipher = { |
432 | .min_keysize = TF_MIN_KEY_SIZE * 2, | 427 | .min_keysize = TF_MIN_KEY_SIZE * 2, |