From a43bac94144b6bb59a992a3781e5367f67a2af79 Mon Sep 17 00:00:00 2001 From: Wenkai Lin Date: Sun, 24 Apr 2022 09:54:23 +0800 Subject: [PATCH 118/183] uadk: fix parameter of function has different name Parameter of function has different name than previous declaration of header, so fix them. Signed-off-by: Wenkai Lin --- include/wd_aead.h | 4 ++-- include/wd_cipher.h | 4 ++-- include/wd_comp.h | 4 ++-- include/wd_digest.h | 4 ++-- include/wd_ecc.h | 4 ++-- include/wd_rsa.h | 4 ++-- include/wd_util.h | 27 +++++++++++++++------------ v1/drv/hisi_hpre_udrv.h | 2 +- v1/drv/hisi_qm_udrv.h | 2 +- v1/drv/hisi_zip_udrv.h | 2 +- v1/wd_aead.h | 10 +++++----- v1/wd_cipher.h | 4 ++-- v1/wd_digest.h | 4 ++-- 13 files changed, 39 insertions(+), 36 deletions(-) diff --git a/include/wd_aead.h b/include/wd_aead.h index a632cd8..3840062 100644 --- a/include/wd_aead.h +++ b/include/wd_aead.h @@ -161,11 +161,11 @@ int wd_aead_get_maxauthsize(handle_t h_sess); /** * wd_aead_poll_ctx() poll operation for asynchronous operation - * @index: index of ctx which will be polled. + * @idx: index of ctx which will be polled. * @expt: user expected num respondences * @count: how many respondences this poll has to get. */ -int wd_aead_poll_ctx(__u32 index, __u32 expt, __u32* count); +int wd_aead_poll_ctx(__u32 idx, __u32 expt, __u32 *count); /** * wd_aead_poll() Poll finished request. diff --git a/include/wd_cipher.h b/include/wd_cipher.h index 660d7e8..127cd45 100644 --- a/include/wd_cipher.h +++ b/include/wd_cipher.h @@ -135,11 +135,11 @@ int wd_do_cipher_sync(handle_t h_sess, struct wd_cipher_req *req); int wd_do_cipher_async(handle_t h_sess, struct wd_cipher_req *req); /** * wd_cipher_poll_ctx() poll operation for asynchronous operation - * @index: index of ctx which will be polled. + * @idx: index of ctx which will be polled. * @expt: user expected num respondences * @count: how many respondences this poll has to get. */ -int wd_cipher_poll_ctx(__u32 index, __u32 expt, __u32* count); +int wd_cipher_poll_ctx(__u32 idx, __u32 expt, __u32 *count); /** * wd_cipher_poll() Poll finished request. * this function will call poll_policy function which is registered to wd cipher diff --git a/include/wd_comp.h b/include/wd_comp.h index 460cfa7..5688b8b 100644 --- a/include/wd_comp.h +++ b/include/wd_comp.h @@ -154,7 +154,7 @@ int wd_do_comp_async(handle_t h_sess, struct wd_comp_req *req); /** * wd_comp_poll_ctx() - Poll a ctx. - * @index: The index of ctx which will be polled. + * @idx: The index of ctx which will be polled. * @expt: Max number of requests to poll. If 0, polled all finished * requests in this ctx. * @count: Return the number of polled requests finally. @@ -163,7 +163,7 @@ int wd_do_comp_async(handle_t h_sess, struct wd_comp_req *req); * User defines polling policy in poll_policiy, when it needs to poll a * specific ctx, this function should be used. */ -int wd_comp_poll_ctx(__u32 index, __u32 expt, __u32 *count); +int wd_comp_poll_ctx(__u32 idx, __u32 expt, __u32 *count); int wd_comp_poll(__u32 expt, __u32 *count); diff --git a/include/wd_digest.h b/include/wd_digest.h index 7e93a80..92b9a4f 100644 --- a/include/wd_digest.h +++ b/include/wd_digest.h @@ -157,11 +157,11 @@ int wd_digest_set_key(handle_t h_sess, const __u8 *key, __u32 key_len); /** * wd_digest_poll() - Poll operation for asynchronous operation. - * @index: index of ctx which will be polled. + * @idx: index of ctx which will be polled. * @expt: Count of polling * @count: recv poll nums. */ -int wd_digest_poll_ctx(__u32 index, __u32 expt, __u32 *count); +int wd_digest_poll_ctx(__u32 idx, __u32 expt, __u32 *count); /** * wd_digest_poll() - Poll operation for asynchronous operation. diff --git a/include/wd_ecc.h b/include/wd_ecc.h index 43b9c89..5aaec23 100644 --- a/include/wd_ecc.h +++ b/include/wd_ecc.h @@ -458,10 +458,10 @@ int wd_ecc_poll(__u32 expt, __u32 *count); /** * wd_do_ecc() - Send a sync eccression request. - * @sess: The session which request will be sent to. + * @h_sess: The session which request will be sent to. * @req: Request. */ -int wd_do_ecc_sync(handle_t sess, struct wd_ecc_req *req); +int wd_do_ecc_sync(handle_t h_sess, struct wd_ecc_req *req); /** * wd_do_ecc_async() - Send an async eccression request. diff --git a/include/wd_rsa.h b/include/wd_rsa.h index 0978b79..ef7a12c 100644 --- a/include/wd_rsa.h +++ b/include/wd_rsa.h @@ -143,10 +143,10 @@ int wd_rsa_poll(__u32 expt, __u32 *count); /** * wd_do_rsa() - Send a sync rsaression request. - * @sess: The session which request will be sent to. + * @h_sess: The session which request will be sent to. * @req: Request. */ -int wd_do_rsa_sync(handle_t sess, struct wd_rsa_req *req); +int wd_do_rsa_sync(handle_t h_sess, struct wd_rsa_req *req); /** * wd_do_rsa_async() - Send an async rsaression request. diff --git a/include/wd_util.h b/include/wd_util.h index a41b4c9..7fe3d72 100644 --- a/include/wd_util.h +++ b/include/wd_util.h @@ -168,7 +168,7 @@ void wd_uninit_async_request_pool(struct wd_async_msg_pool *pool); /* * wd_get_msg_from_pool() - Get a free message from pool. * @pool: Pointer of global pools. - * @index: Index of pool. Should be 0 ~ (pool_num - 1). + * @ctx_idx: Index of pool. Should be 0 ~ (pool_num - 1). * @msg: Put pointer of got message into *msg. * * Return tag of got message. This tag can be used to put a message and @@ -177,25 +177,28 @@ void wd_uninit_async_request_pool(struct wd_async_msg_pool *pool); * be used to avoid possible error; -WD_EBUSY will return if related message pool * is full. */ -int wd_get_msg_from_pool(struct wd_async_msg_pool *pool, int index, void **msg); +int wd_get_msg_from_pool(struct wd_async_msg_pool *pool, int ctx_idx, + void **msg); /* * wd_put_msg_to_pool() - Put a message to pool. * @pool: Pointer of global pools. - * @index: Index of pool. Should be 0 ~ (pool_num - 1). + * @ctx_idx: Index of pool. Should be 0 ~ (pool_num - 1). * @tag: Tag of put message. */ -void wd_put_msg_to_pool(struct wd_async_msg_pool *pool, int index, __u32 tag); +void wd_put_msg_to_pool(struct wd_async_msg_pool *pool, int ctx_idx, + __u32 tag); /* * wd_find_msg_in_pool() - Find a message in pool. * @pool: Pointer of global pools. - * @index: Index of pool. Should be 0 ~ (pool_num - 1). + * @ctx_idx: Index of pool. Should be 0 ~ (pool_num - 1). * @tag: Tag of expected message. * * Return pointer of message whose tag is input tag. */ -void *wd_find_msg_in_pool(struct wd_async_msg_pool *pool, int index, __u32 tag); +void *wd_find_msg_in_pool(struct wd_async_msg_pool *pool, int ctx_idx, + __u32 tag); /* * wd_check_datalist() - Check the data list length @@ -243,7 +246,7 @@ int wd_parse_async_poll_num(struct wd_env_config *config, const char *s); * wd_alg_env_init() - Init wd algorithm environment variable configurations. * This is a help function which can be used by specific * wd algorithm APIs. - * @config: Pointer of wd_env_config which is used to store environment + * @env_config: Pointer of wd_env_config which is used to store environment * variable information. * @table: Table which is used to define specific environment variable态its * default value and related parsing operations. @@ -251,7 +254,7 @@ int wd_parse_async_poll_num(struct wd_env_config *config, const char *s); * environment init. * @table_size: Size of above table. */ -int wd_alg_env_init(struct wd_env_config *config, +int wd_alg_env_init(struct wd_env_config *env_config, const struct wd_config_variable *table, const struct wd_alg_ops *ops, __u32 table_size, @@ -272,9 +275,9 @@ void wd_alg_env_uninit(struct wd_env_config *env_config, * task queue. * @config: Pointer of wd_env_config which is used to store environment * variable information. - * @index: Index of ctx in config. + * @idx: Index of ctx in config. */ -int wd_add_task_to_async_queue(struct wd_env_config *config, __u32 index); +int wd_add_task_to_async_queue(struct wd_env_config *config, __u32 idx); /* * dump_env_info() - dump wd algorithm ctx info. @@ -287,12 +290,12 @@ void dump_env_info(struct wd_env_config *config); * wd_alg_get_env_param() - get specific ctx number. * @config: Pointer of wd_env_config which is used to store environment * variable information. - * @ctx_attr: ctx attributes. + * @attr: ctx attributes. * @num: save ctx number. * @is_enable: save enable inner poll flag. */ int wd_alg_get_env_param(struct wd_env_config *env_config, - struct wd_ctx_attr ctx_attr, + struct wd_ctx_attr attr, __u32 *num, __u8 *is_enable); /* diff --git a/v1/drv/hisi_hpre_udrv.h b/v1/drv/hisi_hpre_udrv.h index d84c4c7..632ad28 100644 --- a/v1/drv/hisi_hpre_udrv.h +++ b/v1/drv/hisi_hpre_udrv.h @@ -83,6 +83,6 @@ int qm_fill_rsa_sqe(void *message, struct qm_queue_info *info, __u16 i); int qm_parse_rsa_sqe(void *msg, const struct qm_queue_info *info, __u16 i, __u16 usr); int qm_fill_ecc_sqe(void *message, struct qm_queue_info *info, __u16 i); -int qm_parse_ecc_sqe(void *msg, const struct qm_queue_info *info, +int qm_parse_ecc_sqe(void *message, const struct qm_queue_info *info, __u16 i, __u16 usr); #endif diff --git a/v1/drv/hisi_qm_udrv.h b/v1/drv/hisi_qm_udrv.h index 3707c7d..588da00 100644 --- a/v1/drv/hisi_qm_udrv.h +++ b/v1/drv/hisi_qm_udrv.h @@ -174,7 +174,7 @@ struct hisi_qm_inject_op { int qm_init_queue(struct wd_queue *q); void qm_uninit_queue(struct wd_queue *q); -int qm_send(struct wd_queue *q, void **msg, __u32 num); +int qm_send(struct wd_queue *q, void **req, __u32 num); int qm_recv(struct wd_queue *q, void **resp, __u32 num); int hisi_qm_inject_op_register(struct wd_queue *q, struct hisi_qm_inject_op *op); int qm_get_hwsgl_info(struct wd_queue *q, struct hw_sgl_info *sgl_info); diff --git a/v1/drv/hisi_zip_udrv.h b/v1/drv/hisi_zip_udrv.h index 4246342..c93b01a 100644 --- a/v1/drv/hisi_zip_udrv.h +++ b/v1/drv/hisi_zip_udrv.h @@ -125,7 +125,7 @@ struct hisi_zip_sqe_v3 { #define HZ_REQ_TYPE_MASK 0xff int qm_fill_zip_sqe(void *smsg, struct qm_queue_info *info, __u16 i); -int qm_parse_zip_sqe(void *msg, const struct qm_queue_info *info, +int qm_parse_zip_sqe(void *hw_msg, const struct qm_queue_info *info, __u16 i, __u16 usr); int qm_fill_zip_sqe_v3(void *smsg, struct qm_queue_info *info, __u16 i); int qm_parse_zip_sqe_v3(void *msg, const struct qm_queue_info *info, diff --git a/v1/wd_aead.h b/v1/wd_aead.h index 4cc1081..ae5697b 100644 --- a/v1/wd_aead.h +++ b/v1/wd_aead.h @@ -142,7 +142,7 @@ void *wcrypto_create_aead_ctx(struct wd_queue *q, * @key: cipher key addr * @key_len: cipher key length */ -int wcrypto_set_aead_ckey(void *ctx, __u8 *ckey, __u16 key_len); +int wcrypto_set_aead_ckey(void *ctx, __u8 *key, __u16 key_len); /** * wcrypto_set_aead_akey() - set authenticate key to aead context. @@ -150,7 +150,7 @@ int wcrypto_set_aead_ckey(void *ctx, __u8 *ckey, __u16 key_len); * @key: authenticate key addr * @key_len: authenticate key length */ -int wcrypto_set_aead_akey(void *ctx, __u8 *akey, __u16 key_len); +int wcrypto_set_aead_akey(void *ctx, __u8 *key, __u16 key_len); /** * wcrypto_aead_setauthsize() - set aead authsize to aead context. @@ -184,13 +184,13 @@ int wcrypto_do_aead(void *ctx, struct wcrypto_aead_op_data *opdata, /** * wcrypto_burst_aead() - (a)synchronous multiple aead operations - * @ctx: context of user, created by wcrypto_create_aead_ctx. + * @a_ctx: context of user, created by wcrypto_create_aead_ctx. * @opdata: operational data * @tag: asynchronous:user_tag; synchronous:NULL. * @num: operations number per calling, maximum number is WCRYPTO_MAX_BURST_NUM. */ -int wcrypto_burst_aead(void *ctx, struct wcrypto_aead_op_data **opdata, - void **tag, __u32 num); +int wcrypto_burst_aead(void *a_ctx, struct wcrypto_aead_op_data **opdata, + void **tag, __u32 num); /** * wcrypto_aead_poll() - poll operation for asynchronous operation diff --git a/v1/wd_cipher.h b/v1/wd_cipher.h index 7059f53..591a590 100644 --- a/v1/wd_cipher.h +++ b/v1/wd_cipher.h @@ -151,11 +151,11 @@ void wcrypto_del_cipher_ctx(void *ctx); /** * wcrypto_burst_cipher() - (a)synchronous multiple cipher operations * @ctx: context of user, created by wcrypto_create_cipher_ctx. - * @opdata: operational data + * @c_opdata: operational data * @tag: asynchronous:user_tag; synchronous:NULL. * @num: operations number per calling, maximum number is WCRYPTO_MAX_BURST_NUM. */ -int wcrypto_burst_cipher(void *ctx, struct wcrypto_cipher_op_data **opdata, +int wcrypto_burst_cipher(void *ctx, struct wcrypto_cipher_op_data **c_opdata, void **tag, __u32 num); #ifdef __cplusplus diff --git a/v1/wd_digest.h b/v1/wd_digest.h index b9b98fe..6ad4c85 100644 --- a/v1/wd_digest.h +++ b/v1/wd_digest.h @@ -152,12 +152,12 @@ void wcrypto_del_digest_ctx(void *ctx); /** * wcrypto_burst_digest() - (a)synchronous multiple digest operations - * @ctx: context of user, created by wcrypto_create_digest_ctx. + * @d_ctx: context of user, created by wcrypto_create_digest_ctx. * @opdata: operational data * @tag: asynchronous:user_tag; synchronous:NULL. * @num: operations number per calling, maximum number is WCRYPTO_MAX_BURST_NUM. */ -int wcrypto_burst_digest(void *ctx, struct wcrypto_digest_op_data **opdata, +int wcrypto_burst_digest(void *d_ctx, struct wcrypto_digest_op_data **opdata, void **tag, __u32 num); #ifdef __cplusplus -- 2.27.0