linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: qat - Unsigned comparison with less than zero
@ 2022-01-05 15:20 Jiapeng Chong
  2022-01-05 15:26 ` Giovanni Cabiddu
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2022-01-05 15:20 UTC (permalink / raw)
  To: giovanni.cabiddu
  Cc: herbert, davem, qat-linux, linux-crypto, linux-kernel,
	Jiapeng Chong, Abaci Robot

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@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: qat - Unsigned comparison with less than zero
  2022-01-05 15:20 [PATCH] crypto: qat - Unsigned comparison with less than zero Jiapeng Chong
@ 2022-01-05 15:26 ` Giovanni Cabiddu
  0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Cabiddu @ 2022-01-05 15:26 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: herbert, davem, qat-linux, linux-crypto, linux-kernel, Abaci Robot

On Wed, Jan 05, 2022 at 11:20:05PM +0800, Jiapeng Chong wrote:
> 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@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
There is already a patch under review that fixes this:
https://marc.info/?l=linux-crypto-vger&m=164138836020725&w=2

Thanks,

-- 
Giovanni

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-05 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 15:20 [PATCH] crypto: qat - Unsigned comparison with less than zero Jiapeng Chong
2022-01-05 15:26 ` Giovanni Cabiddu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).