From 608b4ff6c4c5942d51086781956d36629465ca56 Mon Sep 17 00:00:00 2001
From: Weili Qian <qianweili@huawei.com>
Date: Thu, 10 Mar 2022 20:29:48 +0800
Subject: [PATCH 100/109] v1/hpre: add unlikely() for branch prefetch

Add unlikely() on the route of doing request to improve
branch prefetch success rate.

Signed-off-by: Weili Qian <qianweili@huawei.com>
---
 v1/drv/hisi_hpre_udrv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/v1/drv/hisi_hpre_udrv.c b/v1/drv/hisi_hpre_udrv.c
index ba32114..bd87cbe 100644
--- a/v1/drv/hisi_hpre_udrv.c
+++ b/v1/drv/hisi_hpre_udrv.c
@@ -1976,7 +1976,7 @@ static int fill_sm2_dec_sqe(void *message, struct qm_queue_info *info, __u16 i)
 	}
 
 	ret = qm_fill_ecc_sqe_general(dst, info, i);
-	if (ret)
+	if (unlikely(ret))
 		goto free_out;
 
 	return ret;
-- 
2.27.0

