* [PATCH] crypto: qat: Fix unsigned comparison with less than zero
@ 2022-03-18 2:10 Haowen Bai
2022-03-19 16:10 ` Giovanni Cabiddu
0 siblings, 1 reply; 2+ messages in thread
From: Haowen Bai @ 2022-03-18 2:10 UTC (permalink / raw)
To: giovanni.cabiddu, herbert, davem, marco.chiappero, fiona.trahe,
wojciech.ziemba
Cc: qat-linux, linux-crypto, linux-kernel, Haowen Bai
drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c:67:5-8: WARNING: Unsigned expression compared with zero: ret < 0
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
index 6d10edc..0143835 100644
--- a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
+++ b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
@@ -52,7 +52,7 @@ static const char *const dev_cfg_services[] = {
static int get_service_enabled(struct adf_accel_dev *accel_dev)
{
char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0};
- u32 ret;
+ s32 ret;
ret = adf_cfg_get_param_value(accel_dev, ADF_GENERAL_SEC,
ADF_SERVICES_ENABLED, services);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] crypto: qat: Fix unsigned comparison with less than zero
2022-03-18 2:10 [PATCH] crypto: qat: Fix unsigned comparison with less than zero Haowen Bai
@ 2022-03-19 16:10 ` Giovanni Cabiddu
0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Cabiddu @ 2022-03-19 16:10 UTC (permalink / raw)
To: Haowen Bai
Cc: herbert, davem, marco.chiappero, fiona.trahe, wojciech.ziemba,
qat-linux, linux-crypto, linux-kernel
On Fri, Mar 18, 2022 at 10:10:59AM +0800, Haowen Bai wrote:
> drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c:67:5-8: WARNING: Unsigned expression compared with zero: ret < 0
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
> drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
> index 6d10edc..0143835 100644
> --- a/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
> +++ b/drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c
> @@ -52,7 +52,7 @@ static const char *const dev_cfg_services[] = {
> static int get_service_enabled(struct adf_accel_dev *accel_dev)
> {
> char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0};
> - u32 ret;
> + s32 ret;
>
> ret = adf_cfg_get_param_value(accel_dev, ADF_GENERAL_SEC,
> ADF_SERVICES_ENABLED, services);
A fix for this is already in the cryptodev tree:
844318dfd31f ("crypto: qat - fix a signedness bug in get_service_enabled()")
Thanks,
--
Giovanni
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-19 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-18 2:10 [PATCH] crypto: qat: Fix unsigned comparison with less than zero Haowen Bai
2022-03-19 16:10 ` Giovanni Cabiddu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox