1 From 2c95e6d97892235b5b98cd4805e47fac87c2226f Mon Sep 17 00:00:00 2001
2 From: Eric Biggers <ebiggers@google.com>
3 Date: Sat, 30 Jun 2018 15:16:15 -0700
4 Subject: [PATCH 02/15] crypto: skcipher - remove useless setting of type flags
6 Some skcipher algorithms set .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER. But
7 this is redundant with the C structure type ('struct skcipher_alg'), and
8 crypto_register_skcipher() already sets the type flag automatically,
9 clearing any type flag that was already there. Apparently the useless
10 assignment has just been copy+pasted around.
12 So, remove the useless assignment from all the skcipher algorithms.
14 This patch shouldn't change any actual behavior.
16 Signed-off-by: Eric Biggers <ebiggers@google.com>
17 Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
18 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
20 drivers/crypto/amcc/crypto4xx_core.c | 18 ++++++------------
21 1 file changed, 6 insertions(+), 12 deletions(-)
23 --- a/drivers/crypto/amcc/crypto4xx_core.c
24 +++ b/drivers/crypto/amcc/crypto4xx_core.c
25 @@ -1132,8 +1132,7 @@ static struct crypto4xx_alg_common crypt
26 .cra_name = "cbc(aes)",
27 .cra_driver_name = "cbc-aes-ppc4xx",
28 .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
29 - .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
31 + .cra_flags = CRYPTO_ALG_ASYNC |
32 CRYPTO_ALG_KERN_DRIVER_ONLY,
33 .cra_blocksize = AES_BLOCK_SIZE,
34 .cra_ctxsize = sizeof(struct crypto4xx_ctx),
35 @@ -1153,8 +1152,7 @@ static struct crypto4xx_alg_common crypt
36 .cra_name = "cfb(aes)",
37 .cra_driver_name = "cfb-aes-ppc4xx",
38 .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
39 - .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
41 + .cra_flags = CRYPTO_ALG_ASYNC |
42 CRYPTO_ALG_KERN_DRIVER_ONLY,
43 .cra_blocksize = AES_BLOCK_SIZE,
44 .cra_ctxsize = sizeof(struct crypto4xx_ctx),
45 @@ -1174,8 +1172,7 @@ static struct crypto4xx_alg_common crypt
46 .cra_name = "ctr(aes)",
47 .cra_driver_name = "ctr-aes-ppc4xx",
48 .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
49 - .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
50 - CRYPTO_ALG_NEED_FALLBACK |
51 + .cra_flags = CRYPTO_ALG_NEED_FALLBACK |
53 CRYPTO_ALG_KERN_DRIVER_ONLY,
54 .cra_blocksize = AES_BLOCK_SIZE,
55 @@ -1196,8 +1193,7 @@ static struct crypto4xx_alg_common crypt
56 .cra_name = "rfc3686(ctr(aes))",
57 .cra_driver_name = "rfc3686-ctr-aes-ppc4xx",
58 .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
59 - .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
61 + .cra_flags = CRYPTO_ALG_ASYNC |
62 CRYPTO_ALG_KERN_DRIVER_ONLY,
63 .cra_blocksize = AES_BLOCK_SIZE,
64 .cra_ctxsize = sizeof(struct crypto4xx_ctx),
65 @@ -1217,8 +1213,7 @@ static struct crypto4xx_alg_common crypt
66 .cra_name = "ecb(aes)",
67 .cra_driver_name = "ecb-aes-ppc4xx",
68 .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
69 - .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
71 + .cra_flags = CRYPTO_ALG_ASYNC |
72 CRYPTO_ALG_KERN_DRIVER_ONLY,
73 .cra_blocksize = AES_BLOCK_SIZE,
74 .cra_ctxsize = sizeof(struct crypto4xx_ctx),
75 @@ -1237,8 +1232,7 @@ static struct crypto4xx_alg_common crypt
76 .cra_name = "ofb(aes)",
77 .cra_driver_name = "ofb-aes-ppc4xx",
78 .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY,
79 - .cra_flags = CRYPTO_ALG_TYPE_SKCIPHER |
81 + .cra_flags = CRYPTO_ALG_ASYNC |
82 CRYPTO_ALG_KERN_DRIVER_ONLY,
83 .cra_blocksize = AES_BLOCK_SIZE,
84 .cra_ctxsize = sizeof(struct crypto4xx_ctx),