crypto: hisilicon/qm - update comments to match function
authorWeili Qian <qianweili@huawei.com>
Thu, 9 Feb 2023 12:36:16 +0000 (20:36 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Feb 2023 05:39:33 +0000 (13:39 +0800)
The return values of some functions have been modified,
but the comments have not been modified together. The
comments must be updated to be consistent with the functions.

Also move comments over the codes instead of right place
to ensure consistent coding styles.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c
include/linux/hisi_acc_qm.h

index 5c989f135b4d2ffa19aedbb846d1e657c790de62..2f888e5e2bfa10b6c2dc2763d993599372c4273a 100644 (file)
@@ -1882,8 +1882,7 @@ static struct hisi_qp *qm_create_qp_nolock(struct hisi_qm *qm, u8 alg_type)
  * @qm: The qm we create a qp from.
  * @alg_type: Accelerator specific algorithm type in sqc.
  *
- * return created qp, -EBUSY if all qps in qm allocated, -ENOMEM if allocating
- * qp memory fails.
+ * Return created qp, negative error code if failed.
  */
 static struct hisi_qp *hisi_qm_create_qp(struct hisi_qm *qm, u8 alg_type)
 {
@@ -2052,7 +2051,7 @@ static int qm_start_qp_nolock(struct hisi_qp *qp, unsigned long arg)
  * @arg: Accelerator specific argument.
  *
  * After this function, qp can receive request from user. Return 0 if
- * successful, Return -EBUSY if failed.
+ * successful, negative error code if failed.
  */
 int hisi_qm_start_qp(struct hisi_qp *qp, unsigned long arg)
 {
index df5be7e6db04481b27b73882c29c91108e89cf70..a59fbffa238f7fb3a8ae21769707be220cd705fb 100644 (file)
@@ -308,7 +308,8 @@ struct hisi_qm {
        const struct hisi_qm_err_ini *err_ini;
        struct hisi_qm_err_info err_info;
        struct hisi_qm_err_status err_status;
-       unsigned long misc_ctl; /* driver removing and reset sched */
+       /* driver removing and reset sched */
+       unsigned long misc_ctl;
        /* Device capability bit */
        unsigned long caps;