aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/qat/files/fix-redefinition-of-crypto_request_complete.patch
blob: 3cdbd2ff3017d59a1ef3d0be696ae3a72776506a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 2c1ac0417957a7656eaa0132bf632c9e5d6a94d7 Mon Sep 17 00:00:00 2001
From: Lee Chee Yang <chee.yang.lee@intel.com>
Date: Tue, 3 Oct 2023 15:07:42 +0800
Subject: [PATCH] fix redefinition crypto_request_complete

Fix :
| /poky/build/tmp/work-shared/intel-corei7-64/kernel-source/include/crypto/algapi.h:268:20: error: redefinition of 'crypto_request_complete'
|   268 | static inline void crypto_request_complete(struct crypto_async_request *req,
|       |                    ^~~~~~~~~~~~~~~~~~~~~~~
| In file included from <command-line>:

linux kernel backported crypto_request_complete to 6.1.29 and 5.15.112.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/include/crypto?h=linux-6.1.y&id=c35e03eaece71101ff6cbf776b86403860ac8cc3
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e7ce4ba11635ef23aa7ad40b4b9f9c52ef15f9e2

Upstream-Status: Pending

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>

---
 quickassist/qat/compat/qat_compat.h | 3 +-
 1 file changed, 2 insertion(+), 1 deletion(-)

diff --git a/quickassist/qat/compat/qat_compat.h b/quickassist/qat/compat/qat_compat.h
index 8fcd14a..51b8098 100644
--- a/quickassist/qat/compat/qat_compat.h
+++ b/quickassist/qat/compat/qat_compat.h
@@ -510,7 +511,8 @@ static inline void pci_ignore_hotplug(struct pci_dev *dev)
 void kfree_sensitive(const void *p);
 #endif
 
-#if (KERNEL_VERSION(6, 3, 0) > LINUX_VERSION_CODE)
+#if (KERNEL_VERSION(6, 1, 29) > LINUX_VERSION_CODE && KERNEL_VERSION(6, 1, 0) < LINUX_VERSION_CODE ) || \
+    (KERNEL_VERSION(5, 15, 112) > LINUX_VERSION_CODE)
 static inline void crypto_request_complete(struct crypto_async_request *req,
 					   int err)
 {