diff --git a/1003-src-fix-warning-when-compiling.patch b/1003-src-fix-warning-when-compiling.patch new file mode 100644 index 0000000000000000000000000000000000000000..5227594ff51eecde2754766cec725abd595ab410 --- /dev/null +++ b/1003-src-fix-warning-when-compiling.patch @@ -0,0 +1,42 @@ +From ee295f3a0d5a9b6f6a219d4d34adc84e6b9be170 Mon Sep 17 00:00:00 2001 +From: Xuchun Shang +Date: Tue, 29 Nov 2022 11:32:10 +0800 +Subject: [PATCH] src: fix warning when compiling + +The dev->deviceName is an array which will never be null. + +Signed-off-by: Xuchun Shang +--- + .../lookaside/access_layer/src/common/ctrl/sal_compression.c | 2 +- + quickassist/lookaside/access_layer/src/common/ctrl/sal_crypto.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/quickassist/lookaside/access_layer/src/common/ctrl/sal_compression.c b/quickassist/lookaside/access_layer/src/common/ctrl/sal_compression.c +index 88f4fdb..ed37178 100644 +--- a/quickassist/lookaside/access_layer/src/common/ctrl/sal_compression.c ++++ b/quickassist/lookaside/access_layer/src/common/ctrl/sal_compression.c +@@ -1671,7 +1671,7 @@ CpaStatus cpaDcInstanceGetInfo2(const CpaInstanceHandle instanceHandle, + pInstanceInfo2->isOffloaded = CPA_TRUE; + /* Get the instance name and part name from the config file */ + dev = icp_adf_getAccelDevByAccelId(pCompressionService->pkgID); +- if (NULL == dev || NULL == dev->deviceName) ++ if (NULL == dev) + { + LAC_LOG_ERROR("Can not find device for the instance\n"); + LAC_OS_BZERO(pInstanceInfo2, sizeof(CpaInstanceInfo2)); +diff --git a/quickassist/lookaside/access_layer/src/common/ctrl/sal_crypto.c b/quickassist/lookaside/access_layer/src/common/ctrl/sal_crypto.c +index 64dea7b..1404595 100644 +--- a/quickassist/lookaside/access_layer/src/common/ctrl/sal_crypto.c ++++ b/quickassist/lookaside/access_layer/src/common/ctrl/sal_crypto.c +@@ -2480,7 +2480,7 @@ CpaStatus cpaCyInstanceGetInfo2(const CpaInstanceHandle instanceHandle_in, + + /* Get the instance name and part name*/ + dev = icp_adf_getAccelDevByAccelId(pCryptoService->pkgID); +- if (NULL == dev || NULL == dev->deviceName) ++ if (NULL == dev) + { + LAC_LOG_ERROR("Can not find device for the instance\n"); + LAC_OS_BZERO(pInstanceInfo2, sizeof(CpaInstanceInfo2)); +-- +2.37.3 + diff --git a/intel-QAT20.spec b/intel-QAT20.spec index 940b699d4f50e83f40276c5527bb35c9b619f1b1..905d001485f6438435be9e40ea38a67633809af6 100644 --- a/intel-QAT20.spec +++ b/intel-QAT20.spec @@ -1,4 +1,4 @@ -%define anolis_release 8 +%define anolis_release 9 %define debug_package %{nil} %global kernel_version %(rpm -qa kernel-devel | sed -e 's/kernel-devel-//g') %define QAT_release 00004 @@ -13,6 +13,7 @@ Source: %{name}-%{version}-%{QAT_release}.tar.gz Patch1000: 1000-bugfix-support-5.10.patch Patch1001: 1001-bugfix-split-qat-vdcm-module.patch Patch1002: 1002-bugfix-crash-of-rmmod-vdcm.patch +Patch1003: 1003-src-fix-warning-when-compiling.patch BuildRequires: gcc gcc-c++ make systemd-devel openssl-devel zlib-devel yasm BuildRequires: libudev-devel >= 1.47 @@ -211,6 +212,9 @@ fi ${RM} -rf /etc/udev/rules.d/00-qat.rules /etc/default/qat %changelog +* Tue Nov 29 2022 Xuchun Shang - 0.9.4-00004.9 +- Fix compiler warning + * Tue Nov 15 2022 Xuchun Shang - 0.9.4-00004.8 - Remove QAT driver