diff options
author | Tian Tao <tiantao6@huawei.com> | 2019-10-19 08:41:37 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-10-26 02:09:58 +1100 |
commit | 798ac398179e832b5c2e392d7d17288421aa85f5 (patch) | |
tree | 7c99cb325984301f636e20a351e9d72745b09fc0 /drivers | |
parent | 1d55fdc85799372ab3b0d2a6928e73439f8149aa (diff) | |
download | linux-798ac398179e832b5c2e392d7d17288421aa85f5.tar.bz2 |
crypto: ccree - fix comparison of unsigned expression warning
This patch fixes the following warnings:
drivers/crypto/ccree/cc_aead.c:630:5-12: WARNING: Unsigned expression
compared with zero: seq_len > 0
Signed-off-by: Tian Tao <tiantao6@huawei.com>
v2:
change hmac_setkey() return type to unsigned int to fix the warning.
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/ccree/cc_aead.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/ccree/cc_aead.c b/drivers/crypto/ccree/cc_aead.c index d3e8faa03f15..64d318dc0d47 100644 --- a/drivers/crypto/ccree/cc_aead.c +++ b/drivers/crypto/ccree/cc_aead.c @@ -293,7 +293,8 @@ static unsigned int xcbc_setkey(struct cc_hw_desc *desc, return 4; } -static int hmac_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx) +static unsigned int hmac_setkey(struct cc_hw_desc *desc, + struct cc_aead_ctx *ctx) { unsigned int hmac_pad_const[2] = { HMAC_IPAD_CONST, HMAC_OPAD_CONST }; unsigned int digest_ofs = 0; |