Modify the function name to avoid multiple definition of "wd_check_src_dst()" in uadk/v1.
Signed-off-by: Qi Tao taoqi10@huawei.com --- v1/wd_aead.c | 2 +- v1/wd_cipher.c | 2 +- v1/wd_digest.c | 2 +- v1/wd_rsa.c | 2 +- v1/wd_util.c | 2 +- v1/wd_util.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/v1/wd_aead.c b/v1/wd_aead.c index 380daf0..311b01c 100644 --- a/v1/wd_aead.c +++ b/v1/wd_aead.c @@ -540,7 +540,7 @@ static int param_check(struct wcrypto_aead_ctx *a_ctx, return -WD_EINVAL; }
- ret = wd_check_src_dst(a_opdata[i]->in, a_opdata[i]->in_bytes, a_opdata[i]->out, a_opdata[i]->out_bytes); + ret = wd_check_src_dst_v1(a_opdata[i]->in, a_opdata[i]->in_bytes, a_opdata[i]->out, a_opdata[i]->out_bytes); if (unlikely(ret)) { WD_ERR("invalid: src/dst addr is NULL when src/dst size is non-zero!\n"); return -WD_EINVAL; diff --git a/v1/wd_cipher.c b/v1/wd_cipher.c index 0877993..1d8cb94 100644 --- a/v1/wd_cipher.c +++ b/v1/wd_cipher.c @@ -432,7 +432,7 @@ static int param_check(struct wcrypto_cipher_ctx *c_ctx, return -WD_EINVAL; }
- ret = wd_check_src_dst(c_opdata[i]->in, c_opdata[i]->in_bytes, c_opdata[i]->out, c_opdata[i]->out_bytes); + ret = wd_check_src_dst_v1(c_opdata[i]->in, c_opdata[i]->in_bytes, c_opdata[i]->out, c_opdata[i]->out_bytes); if (unlikely(ret)) { WD_ERR("invalid: src/dst addr is NULL when src/dst size is non-zero!\n"); return -WD_EINVAL; diff --git a/v1/wd_digest.c b/v1/wd_digest.c index cb9b6e0..e9d2dc1 100644 --- a/v1/wd_digest.c +++ b/v1/wd_digest.c @@ -437,7 +437,7 @@ static int param_check(struct wcrypto_digest_ctx *d_ctx, return -WD_EINVAL; }
- ret = wd_check_src_dst(d_opdata[i]->in, d_opdata[i]->in_bytes, + ret = wd_check_src_dst_v1(d_opdata[i]->in, d_opdata[i]->in_bytes, d_opdata[i]->out, d_opdata[i]->out_bytes); if (unlikely(ret)) { WD_ERR("invalid: src/dst addr is NULL when src/dst size is non-zero!\n"); diff --git a/v1/wd_rsa.c b/v1/wd_rsa.c index 9e467d0..5d429b4 100644 --- a/v1/wd_rsa.c +++ b/v1/wd_rsa.c @@ -961,7 +961,7 @@ static int do_rsa_prepare(struct wcrypto_rsa_ctx *ctxt, return -WD_EINVAL; }
- ret = wd_check_src_dst(opdata->in, opdata->in_bytes, opdata->out, opdata->out_bytes); + ret = wd_check_src_dst_v1(opdata->in, opdata->in_bytes, opdata->out, opdata->out_bytes); if (unlikely(ret)) { WD_ERR("invalid: src/dst addr is NULL when src/dst size is non-zero!\n"); return -WD_EINVAL; diff --git a/v1/wd_util.c b/v1/wd_util.c index f31d138..d577d6e 100644 --- a/v1/wd_util.c +++ b/v1/wd_util.c @@ -183,7 +183,7 @@ int wd_burst_recv(struct wd_queue *q, void **resp, __u32 num) return drv_recv(q, resp, num); }
-int wd_check_src_dst(void *src, __u32 in_bytes, void *dst, __u32 out_bytes) +int wd_check_src_dst_v1(void *src, __u32 in_bytes, void *dst, __u32 out_bytes) { if (unlikely((in_bytes && !src) || (out_bytes && !dst))) return -WD_EINVAL; diff --git a/v1/wd_util.h b/v1/wd_util.h index 9e5fa90..6242f94 100644 --- a/v1/wd_util.h +++ b/v1/wd_util.h @@ -421,6 +421,6 @@ void drv_set_sgl_pri(struct wd_sgl *sgl, void *priv); void *drv_get_sgl_pri(struct wd_sgl *sgl); struct wd_mm_br *drv_get_br(void *pool); void wd_sgl_memset(struct wd_sgl *sgl, int ch); -int wd_check_src_dst(void *src, __u32 in_bytes, void *dst, __u32 out_bytes); +int wd_check_src_dst_v1(void *src, __u32 in_bytes, void *dst, __u32 out_bytes);
#endif