* [PATCH] crypto: use signed variable to store status and error checking
@ 2022-01-04 21:38 Muhammad Usama Anjum
2022-01-05 12:13 ` Giovanni Cabiddu
0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Usama Anjum @ 2022-01-04 21:38 UTC (permalink / raw)
To: Giovanni Cabiddu, Herbert Xu, David S. Miller,
open list:QAT DRIVER, open list:CRYPTO API, open list
Cc: usama.anjum
ret should be signed. adf_cfg_get_param_value and match_string return
signed statuses. The return status may be saved wrongly in unsigned ret
variable. Correct the data type of ret to signed int.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.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.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: use signed variable to store status and error checking
2022-01-04 21:38 [PATCH] crypto: use signed variable to store status and error checking Muhammad Usama Anjum
@ 2022-01-05 12:13 ` Giovanni Cabiddu
0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Cabiddu @ 2022-01-05 12:13 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Herbert Xu, David S. Miller, open list:QAT DRIVER,
open list:CRYPTO API, open list
Thanks for your patch.
Patches to the qat driver have the following headline
crypto: qat - ...
not just
crypto: ...
On Wed, Jan 05, 2022 at 02:38:58AM +0500, Muhammad Usama Anjum wrote:
> ret should be signed. adf_cfg_get_param_value and match_string return
Use () when refer to the function().
> signed statuses. The return status may be saved wrongly in unsigned ret
> variable. Correct the data type of ret to signed int.
>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
After fixing,
Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Regards,
--
Giovanni
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-05 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 21:38 [PATCH] crypto: use signed variable to store status and error checking Muhammad Usama Anjum
2022-01-05 12:13 ` Giovanni Cabiddu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.