Update some patch for uadk from mainline. To get more information, please visit the homepage: https://github.comp/Linaro/uadk Signed-off-by: Yang Shen <shenyang39@huawei.com>
156 lines
5.0 KiB
Diff
156 lines
5.0 KiB
Diff
From 190cfeed8f1970f886e2fa3d9a7f45ad0a779966 Mon Sep 17 00:00:00 2001
|
|
From: Wenkai Lin <linwenkai6@hisilicon.com>
|
|
Date: Sat, 23 Jul 2022 16:50:24 +0800
|
|
Subject: [PATCH 157/183] uadk: fix different name in declaration and
|
|
definition
|
|
|
|
Fix static check warnings, which are described like this, "
|
|
Parameter 2 'void ** resp' of function 'dummy_get_from_dio_q'
|
|
has different name than previous declaration 'void ** req'".
|
|
|
|
Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
|
|
---
|
|
v1/drv/dummy_drv.h | 2 +-
|
|
v1/wd_aead.c | 10 +++++-----
|
|
v1/wd_digest.c | 12 ++++++------
|
|
wd_ecc.c | 6 +++---
|
|
4 files changed, 15 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/v1/drv/dummy_drv.h b/v1/drv/dummy_drv.h
|
|
index 7dca1a1..392a47e 100644
|
|
--- a/v1/drv/dummy_drv.h
|
|
+++ b/v1/drv/dummy_drv.h
|
|
@@ -28,7 +28,7 @@
|
|
int dummy_set_queue_dio(struct wd_queue *q);
|
|
void dummy_unset_queue_dio(struct wd_queue *q);
|
|
int dummy_add_to_dio_q(struct wd_queue *q, void **req, __u32 num);
|
|
-int dummy_get_from_dio_q(struct wd_queue *q, void **req, __u32 num);
|
|
+int dummy_get_from_dio_q(struct wd_queue *q, void **resp, __u32 num);
|
|
void dummy_flush(struct wd_queue *q);
|
|
void *dummy_reserve_mem(struct wd_queue *q, size_t size);
|
|
|
|
diff --git a/v1/wd_aead.c b/v1/wd_aead.c
|
|
index 4ff690a..4028895 100644
|
|
--- a/v1/wd_aead.c
|
|
+++ b/v1/wd_aead.c
|
|
@@ -566,7 +566,7 @@ static int param_check(struct wcrypto_aead_ctx *a_ctx,
|
|
return WD_SUCCESS;
|
|
}
|
|
|
|
-int wcrypto_burst_aead(void *a_ctx, struct wcrypto_aead_op_data **a_opdata,
|
|
+int wcrypto_burst_aead(void *a_ctx, struct wcrypto_aead_op_data **opdata,
|
|
void **tag, __u32 num)
|
|
{
|
|
struct wcrypto_aead_cookie *cookies[WCRYPTO_MAX_BURST_NUM] = { NULL };
|
|
@@ -575,7 +575,7 @@ int wcrypto_burst_aead(void *a_ctx, struct wcrypto_aead_op_data **a_opdata,
|
|
__u32 i;
|
|
int ret;
|
|
|
|
- if (param_check(ctxt, a_opdata, tag, num))
|
|
+ if (param_check(ctxt, opdata, tag, num))
|
|
return -WD_EINVAL;
|
|
|
|
ret = wd_get_cookies(&ctxt->pool, (void **)cookies, num);
|
|
@@ -585,13 +585,13 @@ int wcrypto_burst_aead(void *a_ctx, struct wcrypto_aead_op_data **a_opdata,
|
|
}
|
|
|
|
for (i = 0; i < num; i++) {
|
|
- cookies[i]->tag.priv = a_opdata[i]->priv;
|
|
+ cookies[i]->tag.priv = opdata[i]->priv;
|
|
req[i] = &cookies[i]->msg;
|
|
if (tag)
|
|
cookies[i]->tag.wcrypto_tag.tag = tag[i];
|
|
}
|
|
|
|
- ret = aead_requests_init(req, a_opdata, ctxt, num);
|
|
+ ret = aead_requests_init(req, opdata, ctxt, num);
|
|
if (unlikely(ret))
|
|
goto fail_with_cookies;
|
|
|
|
@@ -604,7 +604,7 @@ int wcrypto_burst_aead(void *a_ctx, struct wcrypto_aead_op_data **a_opdata,
|
|
if (tag)
|
|
return ret;
|
|
|
|
- ret = aead_recv_sync(ctxt, a_opdata, num);
|
|
+ ret = aead_recv_sync(ctxt, opdata, num);
|
|
|
|
fail_with_send:
|
|
aead_requests_uninit(req, ctxt, num);
|
|
diff --git a/v1/wd_digest.c b/v1/wd_digest.c
|
|
index 14df736..557ad18 100644
|
|
--- a/v1/wd_digest.c
|
|
+++ b/v1/wd_digest.c
|
|
@@ -351,7 +351,7 @@ static int param_check(struct wcrypto_digest_ctx *d_ctx,
|
|
return WD_SUCCESS;
|
|
}
|
|
|
|
-int wcrypto_burst_digest(void *d_ctx, struct wcrypto_digest_op_data **d_opdata,
|
|
+int wcrypto_burst_digest(void *d_ctx, struct wcrypto_digest_op_data **opdata,
|
|
void **tag, __u32 num)
|
|
{
|
|
struct wcrypto_digest_cookie *cookies[WCRYPTO_MAX_BURST_NUM] = {NULL};
|
|
@@ -360,7 +360,7 @@ int wcrypto_burst_digest(void *d_ctx, struct wcrypto_digest_op_data **d_opdata,
|
|
__u32 i;
|
|
int ret;
|
|
|
|
- if (param_check(ctxt, d_opdata, tag, num))
|
|
+ if (param_check(ctxt, opdata, tag, num))
|
|
return -WD_EINVAL;
|
|
|
|
ret = wd_get_cookies(&ctxt->pool, (void **)cookies, num);
|
|
@@ -370,15 +370,15 @@ int wcrypto_burst_digest(void *d_ctx, struct wcrypto_digest_op_data **d_opdata,
|
|
}
|
|
|
|
for (i = 0; i < num; i++) {
|
|
- cookies[i]->tag.priv = d_opdata[i]->priv;
|
|
+ cookies[i]->tag.priv = opdata[i]->priv;
|
|
req[i] = &cookies[i]->msg;
|
|
if (tag)
|
|
cookies[i]->tag.wcrypto_tag.tag = tag[i];
|
|
}
|
|
|
|
- digest_requests_init(req, d_opdata, d_ctx, num);
|
|
+ digest_requests_init(req, opdata, d_ctx, num);
|
|
/* when num is 1, wcrypto_burst_digest supports stream mode */
|
|
- if (num == 1 && !d_opdata[0]->has_next) {
|
|
+ if (num == 1 && !opdata[0]->has_next) {
|
|
cookies[0]->tag.long_data_len = ctxt->io_bytes;
|
|
ctxt->io_bytes = 0;
|
|
}
|
|
@@ -392,7 +392,7 @@ int wcrypto_burst_digest(void *d_ctx, struct wcrypto_digest_op_data **d_opdata,
|
|
if (tag)
|
|
return ret;
|
|
|
|
- ret = digest_recv_sync(ctxt, d_opdata, num);
|
|
+ ret = digest_recv_sync(ctxt, opdata, num);
|
|
|
|
fail_with_cookies:
|
|
wd_put_cookies(&ctxt->pool, (void **)cookies, num);
|
|
diff --git a/wd_ecc.c b/wd_ecc.c
|
|
index 4cf287b..60a320b 100644
|
|
--- a/wd_ecc.c
|
|
+++ b/wd_ecc.c
|
|
@@ -1277,7 +1277,7 @@ struct wd_ecc_out *wd_ecxdh_new_out(handle_t sess)
|
|
return create_ecc_out((struct wd_ecc_sess *)sess, ECDH_OUT_PARAM_NUM);
|
|
}
|
|
|
|
-void wd_ecxdh_get_out_params(struct wd_ecc_out *out, struct wd_ecc_point **key)
|
|
+void wd_ecxdh_get_out_params(struct wd_ecc_out *out, struct wd_ecc_point **pbk)
|
|
{
|
|
struct wd_ecc_dh_out *dh_out = (void *)out;
|
|
|
|
@@ -1286,8 +1286,8 @@ void wd_ecxdh_get_out_params(struct wd_ecc_out *out, struct wd_ecc_point **key)
|
|
return;
|
|
}
|
|
|
|
- if (key)
|
|
- *key = &dh_out->out;
|
|
+ if (pbk)
|
|
+ *pbk = &dh_out->out;
|
|
}
|
|
|
|
void wd_ecc_del_in(handle_t sess, struct wd_ecc_in *in)
|
|
--
|
|
2.27.0
|
|
|