From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: Haowen Bai <baihaowen@meizu.com>
Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
marco.chiappero@intel.com, fiona.trahe@intel.com,
wojciech.ziemba@intel.com, qat-linux@intel.com,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: qat: Fix unsigned comparison with less than zero
Date: Sat, 19 Mar 2022 16:10:38 +0000 [thread overview]
Message-ID: <YjYAfqkhjeDD+glJ@silpixa00400314> (raw)
In-Reply-To: <1647569459-18376-1-git-send-email-baihaowen@meizu.com>
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
prev parent reply other threads:[~2022-03-19 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=YjYAfqkhjeDD+glJ@silpixa00400314 \
--to=giovanni.cabiddu@intel.com \
--cc=baihaowen@meizu.com \
--cc=davem@davemloft.net \
--cc=fiona.trahe@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