Commit f1420cee authored by Tadeusz Struk's avatar Tadeusz Struk Committed by Herbert Xu

crypto: qat - changed adf_dev_stop to void

It returns always zero anyway.
Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent cb00bca4
...@@ -300,9 +300,7 @@ static void adf_remove(struct pci_dev *pdev) ...@@ -300,9 +300,7 @@ static void adf_remove(struct pci_dev *pdev)
pr_err("QAT: Driver removal failed\n"); pr_err("QAT: Driver removal failed\n");
return; return;
} }
if (adf_dev_stop(accel_dev)) adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
adf_dev_shutdown(accel_dev); adf_dev_shutdown(accel_dev);
adf_disable_aer(accel_dev); adf_disable_aer(accel_dev);
adf_cleanup_accel(accel_dev); adf_cleanup_accel(accel_dev);
......
...@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev) ...@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev)
pr_err("QAT: Driver removal failed\n"); pr_err("QAT: Driver removal failed\n");
return; return;
} }
if (adf_dev_stop(accel_dev)) adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
adf_dev_shutdown(accel_dev); adf_dev_shutdown(accel_dev);
adf_cleanup_accel(accel_dev); adf_cleanup_accel(accel_dev);
adf_cleanup_pci_dev(accel_dev); adf_cleanup_pci_dev(accel_dev);
......
...@@ -300,9 +300,7 @@ static void adf_remove(struct pci_dev *pdev) ...@@ -300,9 +300,7 @@ static void adf_remove(struct pci_dev *pdev)
pr_err("QAT: Driver removal failed\n"); pr_err("QAT: Driver removal failed\n");
return; return;
} }
if (adf_dev_stop(accel_dev)) adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
adf_dev_shutdown(accel_dev); adf_dev_shutdown(accel_dev);
adf_disable_aer(accel_dev); adf_disable_aer(accel_dev);
adf_cleanup_accel(accel_dev); adf_cleanup_accel(accel_dev);
......
...@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev) ...@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev)
pr_err("QAT: Driver removal failed\n"); pr_err("QAT: Driver removal failed\n");
return; return;
} }
if (adf_dev_stop(accel_dev)) adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
adf_dev_shutdown(accel_dev); adf_dev_shutdown(accel_dev);
adf_cleanup_accel(accel_dev); adf_cleanup_accel(accel_dev);
adf_cleanup_pci_dev(accel_dev); adf_cleanup_pci_dev(accel_dev);
......
...@@ -103,7 +103,7 @@ int adf_service_unregister(struct service_hndl *service); ...@@ -103,7 +103,7 @@ int adf_service_unregister(struct service_hndl *service);
int adf_dev_init(struct adf_accel_dev *accel_dev); int adf_dev_init(struct adf_accel_dev *accel_dev);
int adf_dev_start(struct adf_accel_dev *accel_dev); int adf_dev_start(struct adf_accel_dev *accel_dev);
int adf_dev_stop(struct adf_accel_dev *accel_dev); void adf_dev_stop(struct adf_accel_dev *accel_dev);
void adf_dev_shutdown(struct adf_accel_dev *accel_dev); void adf_dev_shutdown(struct adf_accel_dev *accel_dev);
int adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr); int adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr);
......
...@@ -284,13 +284,8 @@ static int adf_ctl_stop_devices(uint32_t id) ...@@ -284,13 +284,8 @@ static int adf_ctl_stop_devices(uint32_t id)
if (!accel_dev->is_vf) if (!accel_dev->is_vf)
continue; continue;
if (adf_dev_stop(accel_dev)) { adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), adf_dev_shutdown(accel_dev);
"Failed to stop qat_dev%d\n", id);
ret = -EFAULT;
} else {
adf_dev_shutdown(accel_dev);
}
} }
} }
...@@ -299,13 +294,8 @@ static int adf_ctl_stop_devices(uint32_t id) ...@@ -299,13 +294,8 @@ static int adf_ctl_stop_devices(uint32_t id)
if (!adf_dev_started(accel_dev)) if (!adf_dev_started(accel_dev))
continue; continue;
if (adf_dev_stop(accel_dev)) { adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), adf_dev_shutdown(accel_dev);
"Failed to stop qat_dev%d\n", id);
ret = -EFAULT;
} else {
adf_dev_shutdown(accel_dev);
}
} }
} }
return ret; return ret;
......
...@@ -236,9 +236,9 @@ EXPORT_SYMBOL_GPL(adf_dev_start); ...@@ -236,9 +236,9 @@ EXPORT_SYMBOL_GPL(adf_dev_start);
* is shuting down. * is shuting down.
* To be used by QAT device specific drivers. * To be used by QAT device specific drivers.
* *
* Return: 0 on success, error code otherwise. * Return: void
*/ */
int adf_dev_stop(struct adf_accel_dev *accel_dev) void adf_dev_stop(struct adf_accel_dev *accel_dev)
{ {
struct service_hndl *service; struct service_hndl *service;
struct list_head *list_itr; struct list_head *list_itr;
...@@ -246,9 +246,9 @@ int adf_dev_stop(struct adf_accel_dev *accel_dev) ...@@ -246,9 +246,9 @@ int adf_dev_stop(struct adf_accel_dev *accel_dev)
int ret; int ret;
if (!adf_dev_started(accel_dev) && if (!adf_dev_started(accel_dev) &&
!test_bit(ADF_STATUS_STARTING, &accel_dev->status)) { !test_bit(ADF_STATUS_STARTING, &accel_dev->status))
return 0; return;
}
clear_bit(ADF_STATUS_STARTING, &accel_dev->status); clear_bit(ADF_STATUS_STARTING, &accel_dev->status);
clear_bit(ADF_STATUS_STARTED, &accel_dev->status); clear_bit(ADF_STATUS_STARTED, &accel_dev->status);
...@@ -279,8 +279,6 @@ int adf_dev_stop(struct adf_accel_dev *accel_dev) ...@@ -279,8 +279,6 @@ int adf_dev_stop(struct adf_accel_dev *accel_dev)
else else
clear_bit(ADF_STATUS_AE_STARTED, &accel_dev->status); clear_bit(ADF_STATUS_AE_STARTED, &accel_dev->status);
} }
return 0;
} }
EXPORT_SYMBOL_GPL(adf_dev_stop); EXPORT_SYMBOL_GPL(adf_dev_stop);
......
...@@ -259,13 +259,7 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs) ...@@ -259,13 +259,7 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
return -EBUSY; return -EBUSY;
} }
if (adf_dev_stop(accel_dev)) { adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev),
"Failed to stop qat_dev%d\n",
accel_dev->accel_id);
return -EFAULT;
}
adf_dev_shutdown(accel_dev); adf_dev_shutdown(accel_dev);
} }
......
...@@ -302,9 +302,7 @@ static void adf_remove(struct pci_dev *pdev) ...@@ -302,9 +302,7 @@ static void adf_remove(struct pci_dev *pdev)
pr_err("QAT: Driver removal failed\n"); pr_err("QAT: Driver removal failed\n");
return; return;
} }
if (adf_dev_stop(accel_dev)) adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
adf_dev_shutdown(accel_dev); adf_dev_shutdown(accel_dev);
adf_disable_aer(accel_dev); adf_disable_aer(accel_dev);
adf_cleanup_accel(accel_dev); adf_cleanup_accel(accel_dev);
......
...@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev) ...@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev)
pr_err("QAT: Driver removal failed\n"); pr_err("QAT: Driver removal failed\n");
return; return;
} }
if (adf_dev_stop(accel_dev)) adf_dev_stop(accel_dev);
dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
adf_dev_shutdown(accel_dev); adf_dev_shutdown(accel_dev);
adf_cleanup_accel(accel_dev); adf_cleanup_accel(accel_dev);
adf_cleanup_pci_dev(accel_dev); adf_cleanup_pci_dev(accel_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment