crypto: ahash - remove useless setting of type flags
authorEric Biggers <ebiggers@google.com>
Sat, 30 Jun 2018 22:16:12 +0000 (15:16 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 8 Jul 2018 16:30:25 +0000 (00:30 +0800)
Many ahash algorithms set .cra_flags = CRYPTO_ALG_TYPE_AHASH.  But this
is redundant with the C structure type ('struct ahash_alg'), and
crypto_register_ahash() 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 ahash algorithms.

This patch shouldn't change any actual behavior.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
20 files changed:
arch/arm/crypto/ghash-ce-glue.c
arch/x86/crypto/ghash-clmulni-intel_glue.c
arch/x86/crypto/sha1-mb/sha1_mb.c
arch/x86/crypto/sha256-mb/sha256_mb.c
arch/x86/crypto/sha512-mb/sha512_mb.c
drivers/crypto/axis/artpec6_crypto.c
drivers/crypto/bcm/cipher.c
drivers/crypto/caam/caamhash.c
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c
drivers/crypto/ccree/cc_hash.c
drivers/crypto/chelsio/chcr_algo.c
drivers/crypto/n2_core.c
drivers/crypto/omap-sham.c
drivers/crypto/s5p-sss.c
drivers/crypto/sahara.c
drivers/crypto/stm32/stm32-hash.c
drivers/crypto/sunxi-ss/sun4i-ss-core.c
drivers/crypto/talitos.c
drivers/crypto/ux500/hash/hash_core.c

index f93c0761929d566aede4aa558dbeb2e3785357b7..124fee03246e2cf9e7d90ad043fa31cd3f3f946e 100644 (file)
@@ -308,7 +308,7 @@ static struct ahash_alg ghash_async_alg = {
                .cra_name       = "ghash",
                .cra_driver_name = "ghash-ce",
                .cra_priority   = 300,
-               .cra_flags      = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+               .cra_flags      = CRYPTO_ALG_ASYNC,
                .cra_blocksize  = GHASH_BLOCK_SIZE,
                .cra_type       = &crypto_ahash_type,
                .cra_ctxsize    = sizeof(struct ghash_async_ctx),
index b1430e92e6382df165f47aa0749c094f20d643be..a3de43b5e20a003d9a623daaa6c60de2f2083761 100644 (file)
@@ -314,7 +314,7 @@ static struct ahash_alg ghash_async_alg = {
                        .cra_driver_name        = "ghash-clmulni",
                        .cra_priority           = 400,
                        .cra_ctxsize            = sizeof(struct ghash_async_ctx),
-                       .cra_flags              = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags              = CRYPTO_ALG_ASYNC,
                        .cra_blocksize          = GHASH_BLOCK_SIZE,
                        .cra_type               = &crypto_ahash_type,
                        .cra_module             = THIS_MODULE,
index 4b2430274935bf2a9ba0df141e0dadd2f9ed2a43..f7929ba6cfb435ad1a2998bf0620813de34a8323 100644 (file)
@@ -746,9 +746,8 @@ static struct ahash_alg sha1_mb_areq_alg = {
                         * algo may not have completed before hashing thread
                         * sleep
                         */
-                       .cra_flags      = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
-                                               CRYPTO_ALG_INTERNAL,
+                       .cra_flags      = CRYPTO_ALG_ASYNC |
+                                         CRYPTO_ALG_INTERNAL,
                        .cra_blocksize  = SHA1_BLOCK_SIZE,
                        .cra_module     = THIS_MODULE,
                        .cra_list       = LIST_HEAD_INIT
@@ -879,7 +878,7 @@ static struct ahash_alg sha1_mb_async_alg = {
                         * priority at runtime using NETLINK_CRYPTO.
                         */
                        .cra_priority           = 50,
-                       .cra_flags              = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags              = CRYPTO_ALG_ASYNC,
                        .cra_blocksize          = SHA1_BLOCK_SIZE,
                        .cra_type               = &crypto_ahash_type,
                        .cra_module             = THIS_MODULE,
index 4c07f6c12c37b14fd88801a3c3d9402535703b97..59a47048920abe85f80025ca9f6d75d4c35001c6 100644 (file)
@@ -745,9 +745,8 @@ static struct ahash_alg sha256_mb_areq_alg = {
                         * algo may not have completed before hashing thread
                         * sleep
                         */
-                       .cra_flags      = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
-                                               CRYPTO_ALG_INTERNAL,
+                       .cra_flags      = CRYPTO_ALG_ASYNC |
+                                         CRYPTO_ALG_INTERNAL,
                        .cra_blocksize  = SHA256_BLOCK_SIZE,
                        .cra_module     = THIS_MODULE,
                        .cra_list       = LIST_HEAD_INIT
@@ -878,8 +877,7 @@ static struct ahash_alg sha256_mb_async_alg = {
                         * priority at runtime using NETLINK_CRYPTO.
                         */
                        .cra_priority           = 50,
-                       .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                                       CRYPTO_ALG_ASYNC,
+                       .cra_flags              = CRYPTO_ALG_ASYNC,
                        .cra_blocksize          = SHA256_BLOCK_SIZE,
                        .cra_type               = &crypto_ahash_type,
                        .cra_module             = THIS_MODULE,
index 6a8c31581604c575dff7e8362beffe5809d16dca..d3a758ac3ade09b3a9aea185e7f20b6f1deb38c2 100644 (file)
@@ -778,9 +778,8 @@ static struct ahash_alg sha512_mb_areq_alg = {
                         * algo may not have completed before hashing thread
                         * sleep
                         */
-                       .cra_flags      = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
-                                               CRYPTO_ALG_INTERNAL,
+                       .cra_flags      = CRYPTO_ALG_ASYNC |
+                                         CRYPTO_ALG_INTERNAL,
                        .cra_blocksize  = SHA512_BLOCK_SIZE,
                        .cra_module     = THIS_MODULE,
                        .cra_list       = LIST_HEAD_INIT
@@ -912,8 +911,7 @@ static struct ahash_alg sha512_mb_async_alg = {
                         * priority at runtime using NETLINK_CRYPTO.
                         */
                        .cra_priority           = 50,
-                       .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                                       CRYPTO_ALG_ASYNC,
+                       .cra_flags              = CRYPTO_ALG_ASYNC,
                        .cra_blocksize          = SHA512_BLOCK_SIZE,
                        .cra_type               = &crypto_ahash_type,
                        .cra_module             = THIS_MODULE,
index 0fb8bbf41a8d9b33a11528bf142fc6c9721c0dfe..049af6de3cb698cf7e31550a2eaaf44fff247f9d 100644 (file)
@@ -2704,7 +2704,7 @@ static struct ahash_alg hash_algos[] = {
                        .cra_name = "sha1",
                        .cra_driver_name = "artpec-sha1",
                        .cra_priority = 300,
-                       .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags = CRYPTO_ALG_ASYNC,
                        .cra_blocksize = SHA1_BLOCK_SIZE,
                        .cra_ctxsize = sizeof(struct artpec6_hashalg_context),
                        .cra_alignmask = 3,
@@ -2727,7 +2727,7 @@ static struct ahash_alg hash_algos[] = {
                        .cra_name = "sha256",
                        .cra_driver_name = "artpec-sha256",
                        .cra_priority = 300,
-                       .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags = CRYPTO_ALG_ASYNC,
                        .cra_blocksize = SHA256_BLOCK_SIZE,
                        .cra_ctxsize = sizeof(struct artpec6_hashalg_context),
                        .cra_alignmask = 3,
@@ -2751,7 +2751,7 @@ static struct ahash_alg hash_algos[] = {
                        .cra_name = "hmac(sha256)",
                        .cra_driver_name = "artpec-hmac-sha256",
                        .cra_priority = 300,
-                       .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags = CRYPTO_ALG_ASYNC,
                        .cra_blocksize = SHA256_BLOCK_SIZE,
                        .cra_ctxsize = sizeof(struct artpec6_hashalg_context),
                        .cra_alignmask = 3,
@@ -2777,7 +2777,7 @@ static struct ahash_alg artpec7_hash_algos[] = {
                        .cra_name = "sha384",
                        .cra_driver_name = "artpec-sha384",
                        .cra_priority = 300,
-                       .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags = CRYPTO_ALG_ASYNC,
                        .cra_blocksize = SHA384_BLOCK_SIZE,
                        .cra_ctxsize = sizeof(struct artpec6_hashalg_context),
                        .cra_alignmask = 3,
@@ -2801,7 +2801,7 @@ static struct ahash_alg artpec7_hash_algos[] = {
                        .cra_name = "hmac(sha384)",
                        .cra_driver_name = "artpec-hmac-sha384",
                        .cra_priority = 300,
-                       .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags = CRYPTO_ALG_ASYNC,
                        .cra_blocksize = SHA384_BLOCK_SIZE,
                        .cra_ctxsize = sizeof(struct artpec6_hashalg_context),
                        .cra_alignmask = 3,
@@ -2824,7 +2824,7 @@ static struct ahash_alg artpec7_hash_algos[] = {
                        .cra_name = "sha512",
                        .cra_driver_name = "artpec-sha512",
                        .cra_priority = 300,
-                       .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags = CRYPTO_ALG_ASYNC,
                        .cra_blocksize = SHA512_BLOCK_SIZE,
                        .cra_ctxsize = sizeof(struct artpec6_hashalg_context),
                        .cra_alignmask = 3,
@@ -2848,7 +2848,7 @@ static struct ahash_alg artpec7_hash_algos[] = {
                        .cra_name = "hmac(sha512)",
                        .cra_driver_name = "artpec-hmac-sha512",
                        .cra_priority = 300,
-                       .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC,
+                       .cra_flags = CRYPTO_ALG_ASYNC,
                        .cra_blocksize = SHA512_BLOCK_SIZE,
                        .cra_ctxsize = sizeof(struct artpec6_hashalg_context),
                        .cra_alignmask = 3,
index 309c67c7012f5a1a469e0e1d5931841fb887d656..2f85a989c4761e11f35a85a339645d84bda813e2 100644 (file)
@@ -3914,8 +3914,7 @@ static struct iproc_alg_s driver_algs[] = {
                                    .cra_name = "md5",
                                    .cra_driver_name = "md5-iproc",
                                    .cra_blocksize = MD5_BLOCK_WORDS * 4,
-                                   .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                                   .cra_flags = CRYPTO_ALG_ASYNC,
                                }
                      },
         .cipher_info = {
@@ -4650,7 +4649,7 @@ static int spu_register_ahash(struct iproc_alg_s *driver_alg)
        hash->halg.base.cra_init = ahash_cra_init;
        hash->halg.base.cra_exit = generic_cra_exit;
        hash->halg.base.cra_type = &crypto_ahash_type;
-       hash->halg.base.cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC;
+       hash->halg.base.cra_flags = CRYPTO_ALG_ASYNC;
        hash->halg.statesize = sizeof(struct spu_hash_export_s);
 
        if (driver_alg->auth_info.mode != HASH_MODE_HMAC) {
index 0beb28196e20a34a78a233b715bf91941f770eaa..a20123e28ce6f1068395484e9562f98bc3c8bf93 100644 (file)
@@ -1846,7 +1846,7 @@ caam_hash_alloc(struct caam_hash_template *template,
        alg->cra_priority = CAAM_CRA_PRIORITY;
        alg->cra_blocksize = template->blocksize;
        alg->cra_alignmask = 0;
-       alg->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_TYPE_AHASH;
+       alg->cra_flags = CRYPTO_ALG_ASYNC;
        alg->cra_type = &crypto_ahash_type;
 
        t_alg->alg_type = template->alg_type;
index 26687f318de623a14aae7304b0956d9781a9def0..bdc2715b3cac9110e48a3ce139d78497334e66b8 100644 (file)
@@ -399,7 +399,7 @@ int ccp_register_aes_cmac_algs(struct list_head *head)
        base = &halg->base;
        snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "cmac(aes)");
        snprintf(base->cra_driver_name, CRYPTO_MAX_ALG_NAME, "cmac-aes-ccp");
-       base->cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC |
+       base->cra_flags = CRYPTO_ALG_ASYNC |
                          CRYPTO_ALG_KERN_DRIVER_ONLY |
                          CRYPTO_ALG_NEED_FALLBACK;
        base->cra_blocksize = AES_BLOCK_SIZE;
index 871c9628a2ee67497ed81718e4dd046b1eae8df4..366d3e914ac55140924d8011e964b1bee8dab8b9 100644 (file)
@@ -497,7 +497,7 @@ static int ccp_register_sha_alg(struct list_head *head,
        snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name);
        snprintf(base->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s",
                 def->drv_name);
-       base->cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC |
+       base->cra_flags = CRYPTO_ALG_ASYNC |
                          CRYPTO_ALG_KERN_DRIVER_ONLY |
                          CRYPTO_ALG_NEED_FALLBACK;
        base->cra_blocksize = def->block_size;
index 96ff777474d71e93c8c2287dfc6b8ce06277e8a7..9cc7f8a95f96c8b7637d2d5c7c5d364ca00711a9 100644 (file)
@@ -1813,8 +1813,7 @@ static struct cc_hash_alg *cc_alloc_hash_alg(struct cc_hash_template *template,
        alg->cra_exit = cc_cra_exit;
 
        alg->cra_init = cc_cra_init;
-       alg->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_TYPE_AHASH |
-                       CRYPTO_ALG_KERN_DRIVER_ONLY;
+       alg->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY;
        alg->cra_type = &crypto_ahash_type;
 
        t_crypto_alg->hash_mode = template->hash_mode;
index b916c4eb608c8fddf768e0822fbeb5b66db01615..6bbedf1bb7bda87db03ba13386624065b17d7e22 100644 (file)
@@ -4203,7 +4203,6 @@ static int chcr_unregister_alg(void)
 #define SZ_AHASH_CTX sizeof(struct chcr_context)
 #define SZ_AHASH_H_CTX (sizeof(struct chcr_context) + sizeof(struct hmac_ctx))
 #define SZ_AHASH_REQ_CTX sizeof(struct chcr_ahash_req_ctx)
-#define AHASH_CRA_FLAGS (CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC)
 
 /*
  *     chcr_register_alg - Register crypto algorithms with kernel framework.
@@ -4258,7 +4257,7 @@ static int chcr_register_alg(void)
                        a_hash->halg.statesize = SZ_AHASH_REQ_CTX;
                        a_hash->halg.base.cra_priority = CHCR_CRA_PRIORITY;
                        a_hash->halg.base.cra_module = THIS_MODULE;
-                       a_hash->halg.base.cra_flags = AHASH_CRA_FLAGS;
+                       a_hash->halg.base.cra_flags = CRYPTO_ALG_ASYNC;
                        a_hash->halg.base.cra_alignmask = 0;
                        a_hash->halg.base.cra_exit = NULL;
                        a_hash->halg.base.cra_type = &crypto_ahash_type;
index ab6235b7ff227f59ea7401deb9e62a16d7c64823..55f34cfc43ff6c9bce271977f15300f0be6e90c3 100644 (file)
@@ -1487,8 +1487,7 @@ static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl)
        snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name);
        snprintf(base->cra_driver_name, CRYPTO_MAX_ALG_NAME, "%s-n2", tmpl->name);
        base->cra_priority = N2_CRA_PRIORITY;
-       base->cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                         CRYPTO_ALG_KERN_DRIVER_ONLY |
+       base->cra_flags = CRYPTO_ALG_KERN_DRIVER_ONLY |
                          CRYPTO_ALG_NEED_FALLBACK;
        base->cra_blocksize = tmpl->block_size;
        base->cra_ctxsize = sizeof(struct n2_hash_ctx);
index d1a1c74fb56a8148399facace2d0295e2f25e305..0641185bd82f9d2daed6a17c32e7cb1edbc7b451 100644 (file)
@@ -1464,8 +1464,7 @@ static struct ahash_alg algs_sha1_md5[] = {
                .cra_name               = "sha1",
                .cra_driver_name        = "omap-sha1",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_KERN_DRIVER_ONLY |
+               .cra_flags              = CRYPTO_ALG_KERN_DRIVER_ONLY |
                                                CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA1_BLOCK_SIZE,
@@ -1487,8 +1486,7 @@ static struct ahash_alg algs_sha1_md5[] = {
                .cra_name               = "md5",
                .cra_driver_name        = "omap-md5",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_KERN_DRIVER_ONLY |
+               .cra_flags              = CRYPTO_ALG_KERN_DRIVER_ONLY |
                                                CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA1_BLOCK_SIZE,
@@ -1511,8 +1509,7 @@ static struct ahash_alg algs_sha1_md5[] = {
                .cra_name               = "hmac(sha1)",
                .cra_driver_name        = "omap-hmac-sha1",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_KERN_DRIVER_ONLY |
+               .cra_flags              = CRYPTO_ALG_KERN_DRIVER_ONLY |
                                                CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA1_BLOCK_SIZE,
@@ -1536,8 +1533,7 @@ static struct ahash_alg algs_sha1_md5[] = {
                .cra_name               = "hmac(md5)",
                .cra_driver_name        = "omap-hmac-md5",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_KERN_DRIVER_ONLY |
+               .cra_flags              = CRYPTO_ALG_KERN_DRIVER_ONLY |
                                                CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA1_BLOCK_SIZE,
@@ -1564,8 +1560,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                .cra_name               = "sha224",
                .cra_driver_name        = "omap-sha224",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA224_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx),
@@ -1586,8 +1581,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                .cra_name               = "sha256",
                .cra_driver_name        = "omap-sha256",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA256_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx),
@@ -1609,8 +1603,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                .cra_name               = "hmac(sha224)",
                .cra_driver_name        = "omap-hmac-sha224",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA224_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx) +
@@ -1633,8 +1626,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                .cra_name               = "hmac(sha256)",
                .cra_driver_name        = "omap-hmac-sha256",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA256_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx) +
@@ -1659,8 +1651,7 @@ static struct ahash_alg algs_sha384_sha512[] = {
                .cra_name               = "sha384",
                .cra_driver_name        = "omap-sha384",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA384_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx),
@@ -1681,8 +1672,7 @@ static struct ahash_alg algs_sha384_sha512[] = {
                .cra_name               = "sha512",
                .cra_driver_name        = "omap-sha512",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA512_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx),
@@ -1704,8 +1694,7 @@ static struct ahash_alg algs_sha384_sha512[] = {
                .cra_name               = "hmac(sha384)",
                .cra_driver_name        = "omap-hmac-sha384",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA384_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx) +
@@ -1728,8 +1717,7 @@ static struct ahash_alg algs_sha384_sha512[] = {
                .cra_name               = "hmac(sha512)",
                .cra_driver_name        = "omap-hmac-sha512",
                .cra_priority           = 400,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA512_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct omap_sham_ctx) +
index bf7163042569df4363a69f953ae48bfc73c84d64..faa282074e5aa4a611b9ee137fc393d3fecc4a3c 100644 (file)
@@ -1765,8 +1765,7 @@ static struct ahash_alg algs_sha1_md5_sha256[] = {
                .cra_name               = "sha1",
                .cra_driver_name        = "exynos-sha1",
                .cra_priority           = 100,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                         CRYPTO_ALG_KERN_DRIVER_ONLY |
+               .cra_flags              = CRYPTO_ALG_KERN_DRIVER_ONLY |
                                          CRYPTO_ALG_ASYNC |
                                          CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = HASH_BLOCK_SIZE,
@@ -1791,8 +1790,7 @@ static struct ahash_alg algs_sha1_md5_sha256[] = {
                .cra_name               = "md5",
                .cra_driver_name        = "exynos-md5",
                .cra_priority           = 100,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                         CRYPTO_ALG_KERN_DRIVER_ONLY |
+               .cra_flags              = CRYPTO_ALG_KERN_DRIVER_ONLY |
                                          CRYPTO_ALG_ASYNC |
                                          CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = HASH_BLOCK_SIZE,
@@ -1817,8 +1815,7 @@ static struct ahash_alg algs_sha1_md5_sha256[] = {
                .cra_name               = "sha256",
                .cra_driver_name        = "exynos-sha256",
                .cra_priority           = 100,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                         CRYPTO_ALG_KERN_DRIVER_ONLY |
+               .cra_flags              = CRYPTO_ALG_KERN_DRIVER_ONLY |
                                          CRYPTO_ALG_ASYNC |
                                          CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = HASH_BLOCK_SIZE,
index 0f2245e1af2b1d7d7b8a4f7268b1ce1f61846da8..4379f016fbeeeede4a7e76c3a3ad3d53ebc136ff 100644 (file)
@@ -1253,8 +1253,7 @@ static struct ahash_alg sha_v3_algs[] = {
                .cra_name               = "sha1",
                .cra_driver_name        = "sahara-sha1",
                .cra_priority           = 300,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA1_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct sahara_ctx),
@@ -1280,8 +1279,7 @@ static struct ahash_alg sha_v4_algs[] = {
                .cra_name               = "sha256",
                .cra_driver_name        = "sahara-sha256",
                .cra_priority           = 300,
-               .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
-                                               CRYPTO_ALG_ASYNC |
+               .cra_flags              = CRYPTO_ALG_ASYNC |
                                                CRYPTO_ALG_NEED_FALLBACK,
                .cra_blocksize          = SHA256_BLOCK_SIZE,
                .cra_ctxsize            = sizeof(struct sahara_ctx),
index d1d7233d7dd6b555b37f246f437d599122f49556..590d7352837e50e0a37ee6f84af4a9cff2dcc6db 100644 (file)
@@ -1150,8 +1150,7 @@ static struct ahash_alg algs_md5_sha1[] = {
                                .cra_name = "md5",
                                .cra_driver_name = "stm32-md5",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = MD5_HMAC_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
@@ -1177,8 +1176,7 @@ static struct ahash_alg algs_md5_sha1[] = {
                                .cra_name = "hmac(md5)",
                                .cra_driver_name = "stm32-hmac-md5",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = MD5_HMAC_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
@@ -1203,8 +1201,7 @@ static struct ahash_alg algs_md5_sha1[] = {
                                .cra_name = "sha1",
                                .cra_driver_name = "stm32-sha1",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = SHA1_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
@@ -1230,8 +1227,7 @@ static struct ahash_alg algs_md5_sha1[] = {
                                .cra_name = "hmac(sha1)",
                                .cra_driver_name = "stm32-hmac-sha1",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = SHA1_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
@@ -1259,8 +1255,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                                .cra_name = "sha224",
                                .cra_driver_name = "stm32-sha224",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = SHA224_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
@@ -1286,8 +1281,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                                .cra_name = "hmac(sha224)",
                                .cra_driver_name = "stm32-hmac-sha224",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = SHA224_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
@@ -1312,8 +1306,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                                .cra_name = "sha256",
                                .cra_driver_name = "stm32-sha256",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = SHA256_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
@@ -1339,8 +1332,7 @@ static struct ahash_alg algs_sha224_sha256[] = {
                                .cra_name = "hmac(sha256)",
                                .cra_driver_name = "stm32-hmac-sha256",
                                .cra_priority = 200,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                       CRYPTO_ALG_ASYNC |
+                               .cra_flags = CRYPTO_ALG_ASYNC |
                                        CRYPTO_ALG_KERN_DRIVER_ONLY,
                                .cra_blocksize = SHA256_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct stm32_hash_ctx),
index a81d89b3b7d8d173666bf819337433f24f6bc0af..d96bf75785698affeedf9245a9535e3270601105 100644 (file)
@@ -45,7 +45,6 @@ static struct sun4i_ss_alg_template ss_algs[] = {
                                .cra_driver_name = "md5-sun4i-ss",
                                .cra_priority = 300,
                                .cra_alignmask = 3,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH,
                                .cra_blocksize = MD5_HMAC_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct sun4i_req_ctx),
                                .cra_module = THIS_MODULE,
@@ -73,7 +72,6 @@ static struct sun4i_ss_alg_template ss_algs[] = {
                                .cra_driver_name = "sha1-sun4i-ss",
                                .cra_priority = 300,
                                .cra_alignmask = 3,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH,
                                .cra_blocksize = SHA1_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct sun4i_req_ctx),
                                .cra_module = THIS_MODULE,
index cf14f099ce4a0d8092e113f49848e1accef63755..323b46d2457d95cfed7e9ab5f4ef42bf05327bb8 100644 (file)
@@ -2822,8 +2822,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "md5",
                                .cra_driver_name = "md5-talitos",
                                .cra_blocksize = MD5_HMAC_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2838,8 +2837,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "sha1",
                                .cra_driver_name = "sha1-talitos",
                                .cra_blocksize = SHA1_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2854,8 +2852,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "sha224",
                                .cra_driver_name = "sha224-talitos",
                                .cra_blocksize = SHA224_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2870,8 +2867,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "sha256",
                                .cra_driver_name = "sha256-talitos",
                                .cra_blocksize = SHA256_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2886,8 +2882,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "sha384",
                                .cra_driver_name = "sha384-talitos",
                                .cra_blocksize = SHA384_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2902,8 +2897,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "sha512",
                                .cra_driver_name = "sha512-talitos",
                                .cra_blocksize = SHA512_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2918,8 +2912,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "hmac(md5)",
                                .cra_driver_name = "hmac-md5-talitos",
                                .cra_blocksize = MD5_HMAC_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2934,8 +2927,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "hmac(sha1)",
                                .cra_driver_name = "hmac-sha1-talitos",
                                .cra_blocksize = SHA1_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2950,8 +2942,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "hmac(sha224)",
                                .cra_driver_name = "hmac-sha224-talitos",
                                .cra_blocksize = SHA224_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2966,8 +2957,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "hmac(sha256)",
                                .cra_driver_name = "hmac-sha256-talitos",
                                .cra_blocksize = SHA256_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2982,8 +2972,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "hmac(sha384)",
                                .cra_driver_name = "hmac-sha384-talitos",
                                .cra_blocksize = SHA384_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2998,8 +2987,7 @@ static struct talitos_alg_template driver_algs[] = {
                                .cra_name = "hmac(sha512)",
                                .cra_driver_name = "hmac-sha512-talitos",
                                .cra_blocksize = SHA512_BLOCK_SIZE,
-                               .cra_flags = CRYPTO_ALG_TYPE_AHASH |
-                                            CRYPTO_ALG_ASYNC,
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                        }
                },
                .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
index 2d0a677bcc763852731683d9603cc64468a16cf7..7de22a646adff787dd352a4db7d9bb0c2656082b 100644 (file)
@@ -1524,8 +1524,7 @@ static struct hash_algo_template hash_algs[] = {
                        .halg.base = {
                                .cra_name = "sha1",
                                .cra_driver_name = "sha1-ux500",
-                               .cra_flags = (CRYPTO_ALG_TYPE_AHASH |
-                                             CRYPTO_ALG_ASYNC),
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                                .cra_blocksize = SHA1_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct hash_ctx),
                                .cra_init = hash_cra_init,
@@ -1548,8 +1547,7 @@ static struct hash_algo_template hash_algs[] = {
                        .halg.base = {
                                .cra_name = "sha256",
                                .cra_driver_name = "sha256-ux500",
-                               .cra_flags = (CRYPTO_ALG_TYPE_AHASH |
-                                             CRYPTO_ALG_ASYNC),
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                                .cra_blocksize = SHA256_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct hash_ctx),
                                .cra_type = &crypto_ahash_type,
@@ -1574,8 +1572,7 @@ static struct hash_algo_template hash_algs[] = {
                        .halg.base = {
                                .cra_name = "hmac(sha1)",
                                .cra_driver_name = "hmac-sha1-ux500",
-                               .cra_flags = (CRYPTO_ALG_TYPE_AHASH |
-                                             CRYPTO_ALG_ASYNC),
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                                .cra_blocksize = SHA1_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct hash_ctx),
                                .cra_type = &crypto_ahash_type,
@@ -1600,8 +1597,7 @@ static struct hash_algo_template hash_algs[] = {
                        .halg.base = {
                                .cra_name = "hmac(sha256)",
                                .cra_driver_name = "hmac-sha256-ux500",
-                               .cra_flags = (CRYPTO_ALG_TYPE_AHASH |
-                                             CRYPTO_ALG_ASYNC),
+                               .cra_flags = CRYPTO_ALG_ASYNC,
                                .cra_blocksize = SHA256_BLOCK_SIZE,
                                .cra_ctxsize = sizeof(struct hash_ctx),
                                .cra_type = &crypto_ahash_type,