[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220105152005.43305-1-jiapeng.chong@linux.alibaba.com>
Date: Wed, 5 Jan 2022 23:20:05 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: giovanni.cabiddu@...el.com
Cc: herbert@...dor.apana.org.au, davem@...emloft.net,
qat-linux@...el.com, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] crypto: qat - Unsigned comparison with less than zero
Fix coccicheck warning:
./drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c:67:5-8: WARNING:
Unsigned expression compared with zero: ret < 0.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.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 6d10edc40aca..68d39c833332 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;
+ int ret;
ret = adf_cfg_get_param_value(accel_dev, ADF_GENERAL_SEC,
ADF_SERVICES_ENABLED, services);
--
2.20.1.7.g153144c
Powered by blists - more mailing lists