* [PATCH] crypto: qat: remove unused vairable.
@ 2016-05-11 19:28 Muhammad Falak R Wani
2016-05-11 20:21 ` Tadeusz Struk
0 siblings, 1 reply; 3+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-11 19:28 UTC (permalink / raw)
To: Herbert Xu
Cc: Tadeusz Struk, David S. Miller, Geliang Tang, qat-linux,
linux-crypto, linux-kernel
Remove the unused variable ret, and return 0 explicitly.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/crypto/qat/qat_common/adf_ctl_drv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/qat/qat_common/adf_ctl_drv.c b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
index db21b49..0f0677f 100644
--- a/drivers/crypto/qat/qat_common/adf_ctl_drv.c
+++ b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
@@ -273,7 +273,6 @@ static int adf_ctl_is_device_in_use(int id)
static int adf_ctl_stop_devices(uint32_t id)
{
struct adf_accel_dev *accel_dev;
- int ret = 0;
list_for_each_entry(accel_dev, adf_devmgr_get_head(), list) {
if (id == accel_dev->accel_id || id == ADF_CFG_ALL_DEVICES) {
@@ -298,7 +297,7 @@ static int adf_ctl_stop_devices(uint32_t id)
adf_dev_shutdown(accel_dev);
}
}
- return ret;
+ return 0;
}
static int adf_ctl_ioctl_dev_stop(struct file *fp, unsigned int cmd,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] crypto: qat: remove unused vairable.
2016-05-11 19:28 [PATCH] crypto: qat: remove unused vairable Muhammad Falak R Wani
@ 2016-05-11 20:21 ` Tadeusz Struk
2016-05-13 9:33 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Tadeusz Struk @ 2016-05-11 20:21 UTC (permalink / raw)
To: Muhammad Falak R Wani, Herbert Xu
Cc: David S. Miller, Geliang Tang, qat-linux, linux-crypto,
linux-kernel
On 05/11/2016 12:28 PM, Muhammad Falak R Wani wrote:
> Remove the unused variable ret, and return 0 explicitly.
Thanks for the patch. In this case it will be even better
to change the adf_ctl_stop_devices() to a void function.
---8<---
Subject: [PATCH] crypto: qat - change the adf_ctl_stop_devices to void
Change the adf_ctl_stop_devices to a void function.
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
---
drivers/crypto/qat/qat_common/adf_ctl_drv.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/qat/qat_common/adf_ctl_drv.c b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
index db21b49..abc7a7f 100644
--- a/drivers/crypto/qat/qat_common/adf_ctl_drv.c
+++ b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
@@ -270,10 +270,9 @@ static int adf_ctl_is_device_in_use(int id)
return 0;
}
-static int adf_ctl_stop_devices(uint32_t id)
+static void adf_ctl_stop_devices(uint32_t id)
{
struct adf_accel_dev *accel_dev;
- int ret = 0;
list_for_each_entry(accel_dev, adf_devmgr_get_head(), list) {
if (id == accel_dev->accel_id || id == ADF_CFG_ALL_DEVICES) {
@@ -298,7 +297,6 @@ static int adf_ctl_stop_devices(uint32_t id)
adf_dev_shutdown(accel_dev);
}
}
- return ret;
}
static int adf_ctl_ioctl_dev_stop(struct file *fp, unsigned int cmd,
@@ -327,9 +325,8 @@ static int adf_ctl_ioctl_dev_stop(struct file *fp, unsigned int cmd,
pr_info("QAT: Stopping acceleration device qat_dev%d.\n",
ctl_data->device_id);
- ret = adf_ctl_stop_devices(ctl_data->device_id);
- if (ret)
- pr_err("QAT: failed to stop device.\n");
+ adf_ctl_stop_devices(ctl_data->device_id);
+
out:
kfree(ctl_data);
return ret;
Thanks,
--
TS
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] crypto: qat: remove unused vairable.
2016-05-11 20:21 ` Tadeusz Struk
@ 2016-05-13 9:33 ` Herbert Xu
0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2016-05-13 9:33 UTC (permalink / raw)
To: Tadeusz Struk
Cc: Muhammad Falak R Wani, David S. Miller, Geliang Tang, qat-linux,
linux-crypto, linux-kernel
On Wed, May 11, 2016 at 01:21:29PM -0700, Tadeusz Struk wrote:
> On 05/11/2016 12:28 PM, Muhammad Falak R Wani wrote:
> > Remove the unused variable ret, and return 0 explicitly.
>
> Thanks for the patch. In this case it will be even better
> to change the adf_ctl_stop_devices() to a void function.
> ---8<---
> Subject: [PATCH] crypto: qat - change the adf_ctl_stop_devices to void
>
> Change the adf_ctl_stop_devices to a void function.
>
> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Patch applied. Thanks!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-13 9:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 19:28 [PATCH] crypto: qat: remove unused vairable Muhammad Falak R Wani
2016-05-11 20:21 ` Tadeusz Struk
2016-05-13 9:33 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox