提交 df33d792 编写于 作者: G Gilad Ben-Yossef 提交者: Greg Kroah-Hartman

staging: ccree: remove MIN/MAX macros

The driver was using open coded MIN/MAX macros to
compute fixed defines. Remove them and use bigger
value always instead.
Signed-off-by: NGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e4607e7b
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* mac_cmp - HW writes 8 B but all bytes hold the same value */ /* mac_cmp - HW writes 8 B but all bytes hold the same value */
#define ICV_CMP_SIZE 8 #define ICV_CMP_SIZE 8
#define CCM_CONFIG_BUF_SIZE (AES_BLOCK_SIZE * 3) #define CCM_CONFIG_BUF_SIZE (AES_BLOCK_SIZE * 3)
#define MAX_MAC_SIZE MAX(SHA256_DIGEST_SIZE, AES_BLOCK_SIZE) #define MAX_MAC_SIZE SHA256_DIGEST_SIZE
/* defines for AES GCM configuration buffer */ /* defines for AES GCM configuration buffer */
#define GCM_BLOCK_LEN_SIZE 8 #define GCM_BLOCK_LEN_SIZE 8
......
...@@ -95,9 +95,6 @@ ...@@ -95,9 +95,6 @@
* field in the HW descriptor. The DMA engine +8 that value. * field in the HW descriptor. The DMA engine +8 that value.
*/ */
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define SSI_MAX_IVGEN_DMA_ADDRESSES 3 #define SSI_MAX_IVGEN_DMA_ADDRESSES 3
struct ssi_crypto_req { struct ssi_crypto_req {
void (*user_cb)(struct device *dev, void *req); void (*user_cb)(struct device *dev, void *req);
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "ssi_sram_mgr.h" #include "ssi_sram_mgr.h"
#define SSI_MAX_AHASH_SEQ_LEN 12 #define SSI_MAX_AHASH_SEQ_LEN 12
#define SSI_MAX_HASH_OPAD_TMP_KEYS_SIZE MAX(SSI_MAX_HASH_BLCK_SIZE, 3 * AES_BLOCK_SIZE) #define SSI_MAX_HASH_OPAD_TMP_KEYS_SIZE SSI_MAX_HASH_BLCK_SIZE
struct ssi_hash_handle { struct ssi_hash_handle {
ssi_sram_addr_t digest_len_sram_addr; /* const value in SRAM*/ ssi_sram_addr_t digest_len_sram_addr; /* const value in SRAM*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册