2022-04-25 02:45:35

by baihaowen

[permalink] [raw]
Subject: [PATCH] crypto: qat - Fix unsigned function returning negative constant

The function qat_uclo_check_image_compat has an unsigned return type, but
returns a negative constant to indicate an error condition. So we change
unsigned to int.

Signed-off-by: Haowen Bai <[email protected]>
---
drivers/crypto/qat/qat_common/qat_uclo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_common/qat_uclo.c b/drivers/crypto/qat/qat_common/qat_uclo.c
index 6356402a2c9e..4b6f37d6e85b 100644
--- a/drivers/crypto/qat/qat_common/qat_uclo.c
+++ b/drivers/crypto/qat/qat_common/qat_uclo.c
@@ -519,7 +519,7 @@ qat_uclo_map_chunk(char *buf, struct icp_qat_uof_filehdr *file_hdr,
return NULL;
}

-static unsigned int
+static int
qat_uclo_check_image_compat(struct icp_qat_uof_encap_obj *encap_uof_obj,
struct icp_qat_uof_image *image)
{
--
2.7.4


2022-04-29 11:01:15

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: qat - Fix unsigned function returning negative constant

On Sun, Apr 24, 2022 at 04:50:31PM +0800, Haowen Bai wrote:
> The function qat_uclo_check_image_compat has an unsigned return type, but
> returns a negative constant to indicate an error condition. So we change
> unsigned to int.
>
> Signed-off-by: Haowen Bai <[email protected]>
> ---
> drivers/crypto/qat/qat_common/qat_uclo.c | 2 +-
> 1 file changed, 1 insertion(+), 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