You need to sign in or sign up before continuing.
提交 f52a42c2 编写于 作者: L lingmingqiang 提交者: Xie XiuQi

ACC: fixup hpre devil digital used

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

1.Devil digital used
2.function arguments exceed
3.Macro usage irregular
Signed-off-by: Ntanghui20 <tanghui20@huawei.com>
Reviewed-by: Nxuzaibo <xuzaibo@huawei.com>
Signed-off-by: Nlingmingqiang <lingmingqiang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 bc64519b
...@@ -24,7 +24,7 @@ struct hpre_ctx; ...@@ -24,7 +24,7 @@ struct hpre_ctx;
#define _CRT_INV 4 #define _CRT_INV 4
#define _DH_G_FLAG 0x02 #define _DH_G_FLAG 0x02
#define HPRE_TRY_SEND_TIMES 100 #define HPRE_TRY_SEND_TIMES 100
#define HPRE_INVLD_REQ_ID -1 #define HPRE_INVLD_REQ_ID (-1)
#define GET_DEV(ctx) ((ctx)->qp->qm->pdev->dev) #define GET_DEV(ctx) ((ctx)->qp->qm->pdev->dev)
#define BITS64_MERGE(low_32, high_32) (((u64)(low_32)) | \ #define BITS64_MERGE(low_32, high_32) (((u64)(low_32)) | \
...@@ -198,7 +198,7 @@ static int _get_data_dma_addr(struct hpre_asym_request *hpre_req, ...@@ -198,7 +198,7 @@ static int _get_data_dma_addr(struct hpre_asym_request *hpre_req,
static int _cp_data_to_dma_buf(struct hpre_asym_request *hpre_req, static int _cp_data_to_dma_buf(struct hpre_asym_request *hpre_req,
struct scatterlist *data, unsigned int len, struct scatterlist *data, unsigned int len,
int is_src, int is_dh, dma_addr_t *tmp) int is_src, dma_addr_t *tmp)
{ {
struct hpre_ctx *ctx = hpre_req->ctx; struct hpre_ctx *ctx = hpre_req->ctx;
struct device *dev = &GET_DEV(ctx); struct device *dev = &GET_DEV(ctx);
...@@ -241,7 +241,7 @@ static int _hw_data_init(struct hpre_asym_request *hpre_req, ...@@ -241,7 +241,7 @@ static int _hw_data_init(struct hpre_asym_request *hpre_req,
return ret; return ret;
} else { } else {
ret = _cp_data_to_dma_buf(hpre_req, data, len, ret = _cp_data_to_dma_buf(hpre_req, data, len,
is_src, is_dh, &tmp); is_src, &tmp);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -242,7 +242,7 @@ static int uacce_mode_set(const char *val, const struct kernel_param *kp) ...@@ -242,7 +242,7 @@ static int uacce_mode_set(const char *val, const struct kernel_param *kp)
return -EINVAL; return -EINVAL;
ret = kstrtou32(val, _TO_DECIMAL, &n); ret = kstrtou32(val, _TO_DECIMAL, &n);
if (ret != 0 || n > 2) if (ret != 0 || n > UACCE_MODE_NOIOMMU)
return -EINVAL; return -EINVAL;
return param_set_int(val, kp); return param_set_int(val, kp);
......
...@@ -42,6 +42,8 @@ static DEFINE_RWLOCK(uacce_qs_lock); ...@@ -42,6 +42,8 @@ static DEFINE_RWLOCK(uacce_qs_lock);
#define uacce_qs_wunlock() write_unlock_irq(&uacce_qs_lock) #define uacce_qs_wunlock() write_unlock_irq(&uacce_qs_lock)
#endif #endif
#define UACCE_RESET_DELAY_MS 10
static const struct file_operations uacce_fops; static const struct file_operations uacce_fops;
static int uacce_fops_fasync(int fd, struct file *file, int mode); static int uacce_fops_fasync(int fd, struct file *file, int mode);
static int uacce_put_queue(struct file *filep); static int uacce_put_queue(struct file *filep);
...@@ -95,7 +97,7 @@ void uacce_reset_prepare(struct uacce *uacce) ...@@ -95,7 +97,7 @@ void uacce_reset_prepare(struct uacce *uacce)
mutex_unlock(&uacce->q_lock); mutex_unlock(&uacce->q_lock);
/* make sure above single been handled */ /* make sure above single been handled */
mdelay(10); mdelay(UACCE_RESET_DELAY_MS);
} }
EXPORT_SYMBOL_GPL(uacce_reset_prepare); EXPORT_SYMBOL_GPL(uacce_reset_prepare);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册