122 lines
4.5 KiB
Diff
122 lines
4.5 KiB
Diff
|
|
From aa9833fb3e1f28446e0dc93aa72887002cf70ca0 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Weili Qian <qianweili@huawei.com>
|
||
|
|
Date: Tue, 31 May 2022 17:01:02 +0800
|
||
|
|
Subject: [PATCH 128/183] comp: remove unused variable priv
|
||
|
|
|
||
|
|
Remove variable priv in function comp_send and comp_recv,
|
||
|
|
it is unused now.
|
||
|
|
|
||
|
|
Signed-off-by: Weili Qian <qianweili@huawei.com>
|
||
|
|
---
|
||
|
|
drv/hisi_comp.c | 5 ++---
|
||
|
|
include/drv/wd_comp_drv.h | 4 ++--
|
||
|
|
wd_comp.c | 12 ++++--------
|
||
|
|
3 files changed, 8 insertions(+), 13 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/drv/hisi_comp.c b/drv/hisi_comp.c
|
||
|
|
index e1d2f6e..2a2367b 100644
|
||
|
|
--- a/drv/hisi_comp.c
|
||
|
|
+++ b/drv/hisi_comp.c
|
||
|
|
@@ -865,7 +865,7 @@ static int fill_zip_comp_sqe(struct hisi_qp *qp, struct wd_comp_msg *msg,
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
-static int hisi_zip_comp_send(handle_t ctx, struct wd_comp_msg *msg, void *priv)
|
||
|
|
+static int hisi_zip_comp_send(handle_t ctx, struct wd_comp_msg *msg)
|
||
|
|
{
|
||
|
|
struct hisi_qp *qp = wd_ctx_get_priv(ctx);
|
||
|
|
handle_t h_qp = (handle_t)qp;
|
||
|
|
@@ -1020,8 +1020,7 @@ static int parse_zip_sqe(struct hisi_qp *qp, struct hisi_zip_sqe *sqe,
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
-static int hisi_zip_comp_recv(handle_t ctx, struct wd_comp_msg *recv_msg,
|
||
|
|
- void *priv)
|
||
|
|
+static int hisi_zip_comp_recv(handle_t ctx, struct wd_comp_msg *recv_msg)
|
||
|
|
{
|
||
|
|
struct hisi_qp *qp = wd_ctx_get_priv(ctx);
|
||
|
|
handle_t h_qp = (handle_t)qp;
|
||
|
|
diff --git a/include/drv/wd_comp_drv.h b/include/drv/wd_comp_drv.h
|
||
|
|
index 0913ed6..e3d2269 100644
|
||
|
|
--- a/include/drv/wd_comp_drv.h
|
||
|
|
+++ b/include/drv/wd_comp_drv.h
|
||
|
|
@@ -61,8 +61,8 @@ struct wd_comp_driver {
|
||
|
|
__u32 drv_ctx_size;
|
||
|
|
int (*init)(struct wd_ctx_config_internal *config, void *priv);
|
||
|
|
void (*exit)(void *priv);
|
||
|
|
- int (*comp_send)(handle_t ctx, struct wd_comp_msg *msg, void *priv);
|
||
|
|
- int (*comp_recv)(handle_t ctx, struct wd_comp_msg *msg, void *priv);
|
||
|
|
+ int (*comp_send)(handle_t ctx, struct wd_comp_msg *msg);
|
||
|
|
+ int (*comp_recv)(handle_t ctx, struct wd_comp_msg *msg);
|
||
|
|
};
|
||
|
|
|
||
|
|
void wd_comp_set_driver(struct wd_comp_driver *drv);
|
||
|
|
diff --git a/wd_comp.c b/wd_comp.c
|
||
|
|
index f2d01b6..1ae0e78 100644
|
||
|
|
--- a/wd_comp.c
|
||
|
|
+++ b/wd_comp.c
|
||
|
|
@@ -175,7 +175,6 @@ struct wd_comp_msg *wd_comp_get_msg(__u32 idx, __u32 tag)
|
||
|
|
int wd_comp_poll_ctx(__u32 idx, __u32 expt, __u32 *count)
|
||
|
|
{
|
||
|
|
struct wd_ctx_config_internal *config = &wd_comp_setting.config;
|
||
|
|
- void *priv = wd_comp_setting.priv;
|
||
|
|
struct wd_ctx_internal *ctx;
|
||
|
|
struct wd_comp_msg resp_msg;
|
||
|
|
struct wd_comp_msg *msg;
|
||
|
|
@@ -198,8 +197,7 @@ int wd_comp_poll_ctx(__u32 idx, __u32 expt, __u32 *count)
|
||
|
|
ctx = config->ctxs + idx;
|
||
|
|
|
||
|
|
do {
|
||
|
|
- ret = wd_comp_setting.driver->comp_recv(ctx->ctx, &resp_msg,
|
||
|
|
- priv);
|
||
|
|
+ ret = wd_comp_setting.driver->comp_recv(ctx->ctx, &resp_msg);
|
||
|
|
if (unlikely(ret < 0)) {
|
||
|
|
if (ret == -WD_HW_EACCESS)
|
||
|
|
WD_ERR("wd comp recv hw error!\n");
|
||
|
|
@@ -398,7 +396,6 @@ static int wd_comp_sync_job(struct wd_comp_sess *sess,
|
||
|
|
{
|
||
|
|
struct wd_ctx_config_internal *config = &wd_comp_setting.config;
|
||
|
|
handle_t h_sched_ctx = wd_comp_setting.sched.h_sched_ctx;
|
||
|
|
- void *priv = wd_comp_setting.priv;
|
||
|
|
struct wd_ctx_internal *ctx;
|
||
|
|
__u64 recv_count = 0;
|
||
|
|
__u32 idx;
|
||
|
|
@@ -415,7 +412,7 @@ static int wd_comp_sync_job(struct wd_comp_sess *sess,
|
||
|
|
|
||
|
|
pthread_spin_lock(&ctx->lock);
|
||
|
|
|
||
|
|
- ret = wd_comp_setting.driver->comp_send(ctx->ctx, msg, priv);
|
||
|
|
+ ret = wd_comp_setting.driver->comp_send(ctx->ctx, msg);
|
||
|
|
if (unlikely(ret < 0)) {
|
||
|
|
pthread_spin_unlock(&ctx->lock);
|
||
|
|
WD_ERR("wd comp send error, ret = %d!\n", ret);
|
||
|
|
@@ -428,7 +425,7 @@ static int wd_comp_sync_job(struct wd_comp_sess *sess,
|
||
|
|
if (unlikely(ret < 0))
|
||
|
|
WD_ERR("wd ctx wait timeout, ret = %d!\n", ret);
|
||
|
|
}
|
||
|
|
- ret = wd_comp_setting.driver->comp_recv(ctx->ctx, msg, priv);
|
||
|
|
+ ret = wd_comp_setting.driver->comp_recv(ctx->ctx, msg);
|
||
|
|
if (unlikely(ret == -WD_HW_EACCESS)) {
|
||
|
|
pthread_spin_unlock(&ctx->lock);
|
||
|
|
WD_ERR("wd comp recv hw error!\n");
|
||
|
|
@@ -663,7 +660,6 @@ int wd_do_comp_async(handle_t h_sess, struct wd_comp_req *req)
|
||
|
|
struct wd_ctx_config_internal *config = &wd_comp_setting.config;
|
||
|
|
struct wd_comp_sess *sess = (struct wd_comp_sess *)h_sess;
|
||
|
|
handle_t h_sched_ctx = wd_comp_setting.sched.h_sched_ctx;
|
||
|
|
- void *priv = wd_comp_setting.priv;
|
||
|
|
struct wd_ctx_internal *ctx;
|
||
|
|
struct wd_comp_msg *msg;
|
||
|
|
int tag, ret;
|
||
|
|
@@ -698,7 +694,7 @@ int wd_do_comp_async(handle_t h_sess, struct wd_comp_req *req)
|
||
|
|
|
||
|
|
pthread_spin_lock(&ctx->lock);
|
||
|
|
|
||
|
|
- ret = wd_comp_setting.driver->comp_send(ctx->ctx, msg, priv);
|
||
|
|
+ ret = wd_comp_setting.driver->comp_send(ctx->ctx, msg);
|
||
|
|
if (unlikely(ret < 0)) {
|
||
|
|
pthread_spin_unlock(&ctx->lock);
|
||
|
|
WD_ERR("wd comp send error, ret = %d!\n", ret);
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|