diff mbox series

[1/4] crypto: ccree: remove useless define

Message ID 20191127084909.14472-2-gilad@benyossef.com
State Accepted
Commit 060f1113250018c272b00a40c3f1877088e5d443
Headers show
Series [1/4] crypto: ccree: remove useless define | expand

Commit Message

Gilad Ben-Yossef Nov. 27, 2019, 8:49 a.m. UTC
The define of CC_DEV_SHA_MAX is not needed since we moved
to runtime detection of capabilities. Remove it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>

---
 drivers/crypto/ccree/cc_driver.h | 1 -
 drivers/crypto/ccree/cc_hash.c   | 2 --
 2 files changed, 3 deletions(-)

-- 
2.23.0
diff mbox series

Patch

diff --git a/drivers/crypto/ccree/cc_driver.h b/drivers/crypto/ccree/cc_driver.h
index ab31d4a68c80..7b6b5d6f1b33 100644
--- a/drivers/crypto/ccree/cc_driver.h
+++ b/drivers/crypto/ccree/cc_driver.h
@@ -28,7 +28,6 @@ 
 
 /* Registers definitions from shared/hw/ree_include */
 #include "cc_host_regs.h"
-#define CC_DEV_SHA_MAX 512
 #include "cc_crypto_ctx.h"
 #include "cc_hw_queue_defs.h"
 #include "cc_sram_mgr.h"
diff --git a/drivers/crypto/ccree/cc_hash.c b/drivers/crypto/ccree/cc_hash.c
index bc71bdf44a9f..aee5db5f8538 100644
--- a/drivers/crypto/ccree/cc_hash.c
+++ b/drivers/crypto/ccree/cc_hash.c
@@ -2358,11 +2358,9 @@  cc_digest_len_addr(void *drvdata, u32 mode)
 	case DRV_HASH_SHA256:
 	case DRV_HASH_MD5:
 		return digest_len_addr;
-#if (CC_DEV_SHA_MAX > 256)
 	case DRV_HASH_SHA384:
 	case DRV_HASH_SHA512:
 		return  digest_len_addr + sizeof(cc_digest_len_init);
-#endif
 	default:
 		return digest_len_addr; /*to avoid kernel crash*/
 	}