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 <[email protected]>
v2:
change hmac_setkey() return type to unsigned int to fix the warning.
---
drivers/crypto/ccree/cc_aead.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/ccree/cc_aead.c b/drivers/crypto/ccree/cc_aead.c
index d3e8faa..64d318d 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;
--
2.7.4
On Sat, Oct 19, 2019 at 3:44 AM Tian Tao <[email protected]> wrote:
>
> 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 <[email protected]>
Acked-by: Gilad Ben-Yossef <[email protected]>
Thanks,
Gilad
>
> v2:
> change hmac_setkey() return type to unsigned int to fix the warning.
> ---
> drivers/crypto/ccree/cc_aead.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccree/cc_aead.c b/drivers/crypto/ccree/cc_aead.c
> index d3e8faa..64d318d 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;
> --
> 2.7.4
>
--
Gilad Ben-Yossef
Chief Coffee Drinker
values of β will give rise to dom!
On Sat, Oct 19, 2019 at 08:41:37AM +0800, Tian Tao wrote:
> 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 <[email protected]>
>
> v2:
> change hmac_setkey() return type to unsigned int to fix the warning.
> ---
> drivers/crypto/ccree/cc_aead.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt