
1. Use 'intptr_t' or 'uintptr_t' to convert pointer into integer. 2. Forbidden exit function 'pthread_exit' is called. 3. Use 1 blank space(' ') instead of TAB('\t') between the right comment and the previous code. 4. Do not add blank lines on the start of a code block defined by braces. Signed-off-by: Qi Tao <taoqi10@huawei.com> --- include/uacce.h | 4 ++-- include/wd.h | 2 +- include/wd_digest.h | 6 +++--- wd_util.c | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/uacce.h b/include/uacce.h index bb8d7402..f7fae272 100644 --- a/include/uacce.h +++ b/include/uacce.h @@ -31,8 +31,8 @@ enum { #define UACCE_API_VER_NOIOMMU_SUBFIX "_noiommu" enum uacce_qfrt { - UACCE_QFRT_MMIO = 0, /* device mmio region */ - UACCE_QFRT_DUS = 1, /* device user share */ + UACCE_QFRT_MMIO = 0, /* device mmio region */ + UACCE_QFRT_DUS = 1, /* device user share */ UACCE_QFRT_MAX, }; diff --git a/include/wd.h b/include/wd.h index 21e5e069..944c3e85 100644 --- a/include/wd.h +++ b/include/wd.h @@ -201,7 +201,7 @@ static inline void *WD_ERR_PTR(uintptr_t error) static inline long WD_PTR_ERR(const void *ptr) { - return (long)ptr; + return (intptr_t)ptr; } /** diff --git a/include/wd_digest.h b/include/wd_digest.h index f0916c36..6ce31f29 100644 --- a/include/wd_digest.h +++ b/include/wd_digest.h @@ -144,9 +144,9 @@ struct wd_digest_req { }; struct wd_cb_tag { - void *ctx; /* user: context or other user relatives */ - void *tag; /* to store user tag */ - int ctx_id; /* user id: context ID or other user identifier */ + void *ctx; /* user: context or other user relatives */ + void *tag; /* to store user tag */ + int ctx_id; /* user id: context ID or other user identifier */ }; /* Digest tag format */ diff --git a/wd_util.c b/wd_util.c index 93249a3f..2236b957 100644 --- a/wd_util.c +++ b/wd_util.c @@ -1480,7 +1480,6 @@ static void *async_poll_process_func(void *args) goto out; } out: - pthread_exit(NULL); return NULL; } @@ -1987,7 +1986,6 @@ err_alloc: void wd_alg_uninit_driver(struct wd_ctx_config_internal *config, struct wd_alg_driver *driver) { - driver->exit(driver); /* Ctx config just need clear once */ wd_clear_ctx_config(config); -- 2.33.0