Skip to contentSkip to conversation

crypto: hash - remove CRYPTO_ALG_TYPE_DIGEST

PATCH In review Eric Biggers 2 participants 2 messages May 20, 2019 – May 30, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: hash - remove CRYPTO_ALG_TYPE_DIGEST

From: Eric Biggers <[email protected]>

Remove the unnecessary constant CRYPTO_ALG_TYPE_DIGEST, which has the same value as CRYPTO_ALG_TYPE_HASH.

---
 Documentation/crypto/architecture.rst | 4 +---
 crypto/cryptd.c                       | 2 +-
 include/linux/crypto.h                | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)
Documentation/crypto/architecture.rst +1 -3
index ee8ff0762d7fa..3eae1ae7f7981 100644
@@ -208,9 +208,7 @@ the aforementioned cipher types:
 -  CRYPTO_ALG_TYPE_KPP Key-agreement Protocol Primitive (KPP) such as
    an ECDH or DH implementation
 
--  CRYPTO_ALG_TYPE_DIGEST Raw message digest
-
--  CRYPTO_ALG_TYPE_HASH Alias for CRYPTO_ALG_TYPE_DIGEST
+-  CRYPTO_ALG_TYPE_HASH Raw message digest
 
 -  CRYPTO_ALG_TYPE_SHASH Synchronous multi-block hash
 
crypto/cryptd.c +1 -1
index 1bf777b765127..c34d10309b1b3 100644
@@ -925,7 +925,7 @@ static int cryptd_create(struct crypto_template *tmpl, struct rtattr **tb)
 	switch (algt->type & algt->mask & CRYPTO_ALG_TYPE_MASK) {
 	case CRYPTO_ALG_TYPE_BLKCIPHER:
 		return cryptd_create_skcipher(tmpl, tb, &queue);
-	case CRYPTO_ALG_TYPE_DIGEST:
+	case CRYPTO_ALG_TYPE_HASH:
 		return cryptd_create_hash(tmpl, tb, &queue);
 	case CRYPTO_ALG_TYPE_AEAD:
 		return cryptd_create_aead(tmpl, tb, &queue);
include/linux/crypto.h +0 -1
index f2565a1031584..311237b1dab02 100644
@@ -54,7 +54,6 @@
 #define CRYPTO_ALG_TYPE_SCOMPRESS	0x0000000b
 #define CRYPTO_ALG_TYPE_RNG		0x0000000c
 #define CRYPTO_ALG_TYPE_AKCIPHER	0x0000000d
-#define CRYPTO_ALG_TYPE_DIGEST		0x0000000e
 #define CRYPTO_ALG_TYPE_HASH		0x0000000e
 #define CRYPTO_ALG_TYPE_SHASH		0x0000000e
 #define CRYPTO_ALG_TYPE_AHASH		0x0000000f
Signature · 1 line
2.21.0.1020.gf2820cf01a-goog
maintainer
#1 lore raw
Quoted 11 lines · Eric Biggers

From: Eric Biggers <[email protected]>

Remove the unnecessary constant CRYPTO_ALG_TYPE_DIGEST, which has the same value as CRYPTO_ALG_TYPE_HASH.

---
 Documentation/crypto/architecture.rst | 4 +---
 crypto/cryptd.c                       | 2 +-
 include/linux/crypto.h                | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt