libwd/0167-drv-hpre-cleanup-ecc-sqe-parsing-process.patch

48 lines
1.2 KiB
Diff
Raw Normal View History

From 858b0598f933cbaa832bb0da85e003c63b366f5d Mon Sep 17 00:00:00 2001
From: Zhiqi Song <songzhiqi1@huawei.com>
Date: Sat, 23 Jul 2022 15:56:27 +0800
Subject: [PATCH 182/183] drv/hpre: cleanup ecc sqe parsing process
The previous processing logic of ecc_sqe_parse() was
not clear enough, so it was modified.
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
---
drv/hisi_hpre.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drv/hisi_hpre.c b/drv/hisi_hpre.c
index 2e9db2f..552a565 100644
--- a/drv/hisi_hpre.c
+++ b/drv/hisi_hpre.c
@@ -2257,18 +2257,18 @@ static int ecc_sqe_parse(struct hisi_qp *qp, struct wd_ecc_msg *msg,
}
hpre_result_check(hw_msg, &msg->result);
- if (!msg->result) {
- ret = ecc_out_transfer(msg, hw_msg, qp->q_info.qp_mode);
- if (ret) {
- msg->result = WD_OUT_EPARA;
- WD_ERR("failed to transfer out ecc BD, ret = %d!\n", ret);
- goto dump_err_msg;
- }
- } else {
+ if (msg->result) {
ret = -msg->result;
goto dump_err_msg;
}
+ ret = ecc_out_transfer(msg, hw_msg, qp->q_info.qp_mode);
+ if (ret) {
+ msg->result = WD_OUT_EPARA;
+ WD_ERR("failed to transfer out ecc BD, ret = %d!\n", ret);
+ goto dump_err_msg;
+ }
+
return ret;
dump_err_msg:
--
2.27.0