From nobody Sun Aug 04 10:23:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WcFyj3b9cz5SY6W; Sun, 04 Aug 2024 10:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFyj0BqXz4CQC; Sun, 4 Aug 2024 10:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yXmG8vf36rLS0jeCmaLW58shyaHIBaIVH4XbP2/lcoU=; b=bVU2dkWTJPBpihqG0Fp7L8Z+P+GCJVXMsWQS7lRndBJKtMKtCe2svSi3LkjwJqWzeVcoq0 1FmkbrIpTHZUm2nQdtxRNnVlSAMnz4VjIx09T/h3gK9whe2GORtKMyoVDSJTkosy+jD+It YuHvdZw0Jclif5skIIpUKhy0RH0YWw/CxnXdh5c+J4DeJY7D7rSQA4HqFHWquBM9SAFO2D bDIXMfj3wjukmgyYJ/pcI6MCTFlob0W0Rgk/5mIcKdBTdbl2BdLGSo+RKA8LQAbxWhZ+h2 4O8JpM1cKskay0RwKKE9TFiXeSpJusUMLaGfP5rO2WJtydHXoWf0DbWv+TjzNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767005; a=rsa-sha256; cv=none; b=umF7U5YGJBdFBTst9XlbOdXnl7cZqmOlZy9sVkzBWXfMc5i03FjJom7l4ezuIr9TO2xctU +oCh2pVU54G/D0+nFEg0CO5oD2VWxT+RusiUc29PigwjHMmdLXQuDZq++dH1FaSTFUJtP0 a5N9QZni/1faN1IfWWngAopxqPz1PlE9I2yw/jWdRP1TuCWJXoLyl+pnrjha/deNocHtNg IWNo07DzFMBP0Djzmj6KbRFnXTisOFUp9yi1w9rXCRt9IG8AFQS1I5kvl9EtWYXC6nFZE2 8Fm1Z2xxhY/daL4uedAG5dTQ7gi1crJ0YCZkOSmA9g2B2ENGv+o7d8gfPWA/cQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yXmG8vf36rLS0jeCmaLW58shyaHIBaIVH4XbP2/lcoU=; b=TU/PK37Cqm6AXpDDImyFUzWTqhT6jkWW9pYfLF7b+8OJedVHOkDrHIGav3bgQAC36rHNUt yRIm3ju36ufQ2PXImS4nGe/qIK5VqstPMWZaie1iJVErkm06ii0C67X4dOQj+iKCWsVWui gLXt26PzRP7yhOuwzCXaUuykSoiUye3Fdv3OeCqFr/wrvmuOSWgYrnV+tg2vOFpTJU0SWi j1RqXshKh20Rc9LA+bvJnPBITn8JmU2tUy5zks1IxoKtoU4rAi2McTm8tItsxTtG4rA6Tn VaylyrusBAM7o3isw7igo0n92A9nTz1F6EJK5vf74u+he/OZT88KPFvuNsv5uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WcFyh6v9Wzs0y; Sun, 4 Aug 2024 10:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474ANOrW045778; Sun, 4 Aug 2024 10:23:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANOXv045775; Sun, 4 Aug 2024 10:23:24 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:24 GMT Message-Id: <202408041023.474ANOXv045775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4b521ea870c7 - stable/14 - Fix enum warnings in qat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4b521ea870c733276811b2473a6648cbb0bea9f0 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4b521ea870c733276811b2473a6648cbb0bea9f0 commit 4b521ea870c733276811b2473a6648cbb0bea9f0 Author: Dimitry Andric AuthorDate: 2024-07-31 12:21:25 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:28 +0000 Fix enum warnings in qat This fixes a number of clang 19 warnings: sys/dev/qat/qat_api/common/compression/dc_session.c:154:15: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 154 | if (CPA_TRUE == pService->comp_device_data.enableDmm) { | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/dev/qat/qat_api/common/compression/dc_session.c:285:17: error: comparison of different enumeration types ('enum _CpaBoolean' and 'icp_qat_hw_compression_delayed_match_t') [-Werror,-Wenum-compare] 285 | (CPA_TRUE == pService->comp_device_data.enableDmm) ? | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `enableDmm` field of variable `comp_device_data` is of type `icp_qat_hw_compression_delayed_match_t`, not `CpaBoolean`. In this case, we can seamlessly replace the value with `ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED`, which is numerically equal to `CPA_TRUE`. MFC after: 3 days (cherry picked from commit 357378bbdedf24ce2b90e9bd831af4a9db3ec70a) --- sys/dev/qat/qat_api/common/compression/dc_session.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/qat/qat_api/common/compression/dc_session.c b/sys/dev/qat/qat_api/common/compression/dc_session.c index c92d6eebdc47..60f4410dac32 100644 --- a/sys/dev/qat/qat_api/common/compression/dc_session.c +++ b/sys/dev/qat/qat_api/common/compression/dc_session.c @@ -151,7 +151,8 @@ dcCompHwBlockPopulate(sal_compression_service_t *pService, } /* Set delay match mode */ - if (CPA_TRUE == pService->comp_device_data.enableDmm) { + if (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED == + pService->comp_device_data.enableDmm) { dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED; } else { dmm = ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_DISABLED; @@ -282,7 +283,8 @@ dcCompHwBlockPopulateGen4(sal_compression_service_t *pService, hw_comp_lower_csr.hash_update = ICP_QAT_HW_COMP_20_SKIP_HASH_UPDATE_DONT_ALLOW; hw_comp_lower_csr.edmm = - (CPA_TRUE == pService->comp_device_data.enableDmm) ? + (ICP_QAT_HW_COMPRESSION_DELAYED_MATCH_ENABLED == + pService->comp_device_data.enableDmm) ? ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_ENABLED : ICP_QAT_HW_COMP_20_EXTENDED_DELAY_MATCH_MODE_EDMM_DISABLED;