crypto: qat - changed adf_dev_stop to void
authorTadeusz Struk <tadeusz.struk@intel.com>
Tue, 29 Mar 2016 17:21:07 +0000 (10:21 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 5 Apr 2016 12:35:54 +0000 (20:35 +0800)
It returns always zero anyway.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_c3xxx/adf_drv.c
drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
drivers/crypto/qat/qat_c62x/adf_drv.c
drivers/crypto/qat/qat_c62xvf/adf_drv.c
drivers/crypto/qat/qat_common/adf_common_drv.h
drivers/crypto/qat/qat_common/adf_ctl_drv.c
drivers/crypto/qat/qat_common/adf_init.c
drivers/crypto/qat/qat_common/adf_sriov.c
drivers/crypto/qat/qat_dh895xcc/adf_drv.c
drivers/crypto/qat/qat_dh895xccvf/adf_drv.c

index e13bd08ddd1e43a1fa14621feec1a16dd910d771..640c3fc870fdc1d911c79a0000b3c72c13efc8e4 100644 (file)
@@ -300,9 +300,7 @@ static void adf_remove(struct pci_dev *pdev)
                pr_err("QAT: Driver removal failed\n");
                return;
        }
-       if (adf_dev_stop(accel_dev))
-               dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
-
+       adf_dev_stop(accel_dev);
        adf_dev_shutdown(accel_dev);
        adf_disable_aer(accel_dev);
        adf_cleanup_accel(accel_dev);
index 1ac4ae90e072cd4a298a378858a0280510f1dd4d..a998981e9610b69e3173041c7d3291c987f62c7f 100644 (file)
@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev)
                pr_err("QAT: Driver removal failed\n");
                return;
        }
-       if (adf_dev_stop(accel_dev))
-               dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
-
+       adf_dev_stop(accel_dev);
        adf_dev_shutdown(accel_dev);
        adf_cleanup_accel(accel_dev);
        adf_cleanup_pci_dev(accel_dev);
index 512c56509718007f64b2c13c12d27c00e051d1bb..bc5cbc193aae5c6167559ea3d2b9975acc7e6a5a 100644 (file)
@@ -300,9 +300,7 @@ static void adf_remove(struct pci_dev *pdev)
                pr_err("QAT: Driver removal failed\n");
                return;
        }
-       if (adf_dev_stop(accel_dev))
-               dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
-
+       adf_dev_stop(accel_dev);
        adf_dev_shutdown(accel_dev);
        adf_disable_aer(accel_dev);
        adf_cleanup_accel(accel_dev);
index d2e4b928f3bee28af8873582fa71c56fa6f31460..ccfb25e8a4a16e3ebed908399406c1a87cd0f1d7 100644 (file)
@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev)
                pr_err("QAT: Driver removal failed\n");
                return;
        }
-       if (adf_dev_stop(accel_dev))
-               dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
-
+       adf_dev_stop(accel_dev);
        adf_dev_shutdown(accel_dev);
        adf_cleanup_accel(accel_dev);
        adf_cleanup_pci_dev(accel_dev);
index 0e82ce3c383e8c6c1f1f39378fbff03cc17e0336..c9e4d469e930b9111b412fc159cd61445307597f 100644 (file)
@@ -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_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);
 
 int adf_iov_putmsg(struct adf_accel_dev *accel_dev, u32 msg, u8 vf_nr);
index 740335630c572355c08a2234217945aa0afd56e7..48a1248381b3411ac547f67d2b4f8861304737a6 100644 (file)
@@ -284,13 +284,8 @@ static int adf_ctl_stop_devices(uint32_t id)
                        if (!accel_dev->is_vf)
                                continue;
 
-                       if (adf_dev_stop(accel_dev)) {
-                               dev_err(&GET_DEV(accel_dev),
-                                       "Failed to stop qat_dev%d\n", id);
-                               ret = -EFAULT;
-                       } else {
-                               adf_dev_shutdown(accel_dev);
-                       }
+                       adf_dev_stop(accel_dev);
+                       adf_dev_shutdown(accel_dev);
                }
        }
 
@@ -299,13 +294,8 @@ static int adf_ctl_stop_devices(uint32_t id)
                        if (!adf_dev_started(accel_dev))
                                continue;
 
-                       if (adf_dev_stop(accel_dev)) {
-                               dev_err(&GET_DEV(accel_dev),
-                                       "Failed to stop qat_dev%d\n", id);
-                               ret = -EFAULT;
-                       } else {
-                               adf_dev_shutdown(accel_dev);
-                       }
+                       adf_dev_stop(accel_dev);
+                       adf_dev_shutdown(accel_dev);
                }
        }
        return ret;
index ef5575e4a215a64c4292cd23c3b8bf2d501b4e83..a29470bc853931088ce51b3d1ee7add82952ed0c 100644 (file)
@@ -236,9 +236,9 @@ EXPORT_SYMBOL_GPL(adf_dev_start);
  * is shuting down.
  * 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 list_head *list_itr;
@@ -246,9 +246,9 @@ int adf_dev_stop(struct adf_accel_dev *accel_dev)
        int ret;
 
        if (!adf_dev_started(accel_dev) &&
-           !test_bit(ADF_STATUS_STARTING, &accel_dev->status)) {
-               return 0;
-       }
+           !test_bit(ADF_STATUS_STARTING, &accel_dev->status))
+               return;
+
        clear_bit(ADF_STATUS_STARTING, &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)
                else
                        clear_bit(ADF_STATUS_AE_STARTED, &accel_dev->status);
        }
-
-       return 0;
 }
 EXPORT_SYMBOL_GPL(adf_dev_stop);
 
index 1117a8b58280a084396f696e77f14b9899386981..4479b0b63296441df8bf4bff4278d65129781d91 100644 (file)
@@ -259,13 +259,7 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
                        return -EBUSY;
                }
 
-               if (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_stop(accel_dev);
                adf_dev_shutdown(accel_dev);
        }
 
index a8c4b92a7cbd6fadd300bf3f4fd3f17390e6834c..4d2de28384513d8c56c521d30ae17f34002d95ae 100644 (file)
@@ -302,9 +302,7 @@ static void adf_remove(struct pci_dev *pdev)
                pr_err("QAT: Driver removal failed\n");
                return;
        }
-       if (adf_dev_stop(accel_dev))
-               dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
-
+       adf_dev_stop(accel_dev);
        adf_dev_shutdown(accel_dev);
        adf_disable_aer(accel_dev);
        adf_cleanup_accel(accel_dev);
index f8cc4bf0a50cd3c9240565ec36f66fe202315c8e..1bf753244230fba097776f07524f308e8ee6c23a 100644 (file)
@@ -270,9 +270,7 @@ static void adf_remove(struct pci_dev *pdev)
                pr_err("QAT: Driver removal failed\n");
                return;
        }
-       if (adf_dev_stop(accel_dev))
-               dev_err(&GET_DEV(accel_dev), "Failed to stop QAT accel dev\n");
-
+       adf_dev_stop(accel_dev);
        adf_dev_shutdown(accel_dev);
        adf_cleanup_accel(accel_dev);
        adf_cleanup_pci_dev(accel_dev);