* [PATCH] crypto: qat - Fix unsigned function returning negative constant
@ 2022-04-24 8:50 Haowen Bai
2022-04-25 14:34 ` Giovanni Cabiddu
2022-04-29 5:50 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Haowen Bai @ 2022-04-24 8:50 UTC (permalink / raw)
To: Giovanni Cabiddu, Herbert Xu, David S. Miller
Cc: Haowen Bai, qat-linux, linux-crypto, linux-kernel
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 <baihaowen@meizu.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: qat - Fix unsigned function returning negative constant
2022-04-24 8:50 [PATCH] crypto: qat - Fix unsigned function returning negative constant Haowen Bai
@ 2022-04-25 14:34 ` Giovanni Cabiddu
2022-04-29 5:50 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Giovanni Cabiddu @ 2022-04-25 14:34 UTC (permalink / raw)
To: Haowen Bai
Cc: Herbert Xu, David S. Miller, qat-linux, linux-crypto, linux-kernel
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
Nit, function names should have parenthesis: qat_uclo_check_image_compat()
> returns a negative constant to indicate an error condition. So we change
> unsigned to int.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Fixes: b4b7e67c917f ("crypto: qat - Intel(R) QAT ucode part of fw loader")
Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: qat - Fix unsigned function returning negative constant
2022-04-24 8:50 [PATCH] crypto: qat - Fix unsigned function returning negative constant Haowen Bai
2022-04-25 14:34 ` Giovanni Cabiddu
@ 2022-04-29 5:50 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2022-04-29 5:50 UTC (permalink / raw)
To: Haowen Bai
Cc: Giovanni Cabiddu, David S. Miller, qat-linux, linux-crypto, linux-kernel
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 <baihaowen@meizu.com>
> ---
> drivers/crypto/qat/qat_common/qat_uclo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-29 5:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 8:50 [PATCH] crypto: qat - Fix unsigned function returning negative constant Haowen Bai
2022-04-25 14:34 ` Giovanni Cabiddu
2022-04-29 5:50 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.