libwd/0003-aead-cipher-digest-fix-some-code-issues.patch
Yang Shen bd84f97fbf libwd: backport for uadk from 2.3.21 to 2.3.24
Update some patch for uadk from mainline.
To get more infomation, please visit the homepage:
https://github.com/Linaro/uadk

Signed-off-by: Yang Shen <shenyang39@huawei.com>
2022-01-10 08:56:20 +00:00

83 lines
2.3 KiB
Diff

From a119cf2838ee41078c452f93d5b48bea2561dfcc Mon Sep 17 00:00:00 2001
From: Kai Ye <yekai13@huawei.com>
Date: Tue, 14 Dec 2021 19:24:47 +0800
Subject: [PATCH 03/28] aead/cipher/digest: fix some code issues
1. Due to the schedule already has the a checking for poll
policy, so delete the checking for poll policy in poll.
2. modify some comments.
Signed-off-by: Kai Ye <yekai13@huawei.com>
---
wd_aead.c | 9 ++-------
wd_cipher.c | 5 -----
wd_digest.c | 5 -----
3 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/wd_aead.c b/wd_aead.c
index 54bd28d..f93f791 100644
--- a/wd_aead.c
+++ b/wd_aead.c
@@ -367,12 +367,12 @@ static int aead_param_check(struct wd_aead_sess *sess,
static int aead_init_check(struct wd_ctx_config *config, struct wd_sched *sched)
{
if (!config || !sched) {
- WD_ERR("failed to check aead init input param!\n");
+ WD_ERR("wd aead config or sched is NULL!\n");
return -WD_EINVAL;
}
if (!wd_is_sva(config->ctxs[0].ctx)) {
- WD_ERR("failed to system is SVA mode!\n");
+ WD_ERR("err, non sva, please check system!\n");
return -WD_EINVAL;
}
@@ -660,11 +660,6 @@ int wd_aead_poll(__u32 expt, __u32 *count)
handle_t h_ctx = wd_aead_setting.sched.h_sched_ctx;
struct wd_sched *sched = &wd_aead_setting.sched;
- if (unlikely(!sched->poll_policy)) {
- WD_ERR("failed to check aead poll_policy!\n");
- return -WD_EINVAL;
- }
-
return sched->poll_policy(h_ctx, expt, count);
}
diff --git a/wd_cipher.c b/wd_cipher.c
index f9d643d..9977765 100644
--- a/wd_cipher.c
+++ b/wd_cipher.c
@@ -580,11 +580,6 @@ int wd_cipher_poll(__u32 expt, __u32 *count)
handle_t h_ctx = wd_cipher_setting.sched.h_sched_ctx;
struct wd_sched *sched = &wd_cipher_setting.sched;
- if (unlikely(!sched->poll_policy)) {
- WD_ERR("failed to check cipher poll_policy!\n");
- return -WD_EINVAL;
- }
-
return sched->poll_policy(h_ctx, expt, count);
}
diff --git a/wd_digest.c b/wd_digest.c
index c110f7b..1962f09 100644
--- a/wd_digest.c
+++ b/wd_digest.c
@@ -484,11 +484,6 @@ int wd_digest_poll(__u32 expt, __u32 *count)
handle_t h_ctx = wd_digest_setting.sched.h_sched_ctx;
struct wd_sched *sched = &wd_digest_setting.sched;
- if (unlikely(!sched->poll_policy)) {
- WD_ERR("failed to check digest poll_policy!\n");
- return -WD_EINVAL;
- }
-
return sched->poll_policy(h_ctx, expt, count);
}
--
2.31.1