Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Haowen Bai <baihaowen@meizu.com>
To: <giovanni.cabiddu@intel.com>, <herbert@gondor.apana.org.au>,
	<davem@davemloft.net>, <marco.chiappero@intel.com>,
	<fiona.trahe@intel.com>, <wojciech.ziemba@intel.com>
Cc: <qat-linux@intel.com>, <linux-crypto@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Haowen Bai <baihaowen@meizu.com>
Subject: [PATCH] crypto: qat: Fix unsigned comparison with less than zero
Date: Fri, 18 Mar 2022 10:10:59 +0800	[thread overview]
Message-ID: <1647569459-18376-1-git-send-email-baihaowen@meizu.com> (raw)

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


             reply	other threads:[~2022-03-18  2:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  2:10 Haowen Bai [this message]
2022-03-19 16:10 ` [PATCH] crypto: qat: Fix unsigned comparison with less than zero Giovanni Cabiddu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1647569459-18376-1-git-send-email-baihaowen@meizu.com \
    --to=baihaowen@meizu.com \
    --cc=davem@davemloft.net \
    --cc=fiona.trahe@intel.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.chiappero@intel.com \
    --cc=qat-linux@intel.com \
    --cc=wojciech.ziemba@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox