From nobody Wed Jul 31 19:32:39 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 4WZ2LJ1Zmrz5RD4h; Wed, 31 Jul 2024 19:32:40 +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 4WZ2LH5WrJz4Ypv; Wed, 31 Jul 2024 19:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454359; 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=t94iEYGTlEAZek0OyefcwWr3WxkdDCULGqmUdOmQVaM=; b=JmtJKzY9ztbCyRmwDyyUTKKa6dZaJqDzqSa1IU9KqBJs3ByklubDUmFuaV3mC5z1CDKWFG XGC6iw2rnOCmAftLJ8Bmzff7BSKDMI5VsOhp8XI46pHkSRzYTwFfPfqPCd4zb7T4Fy/NJZ DNAQAeGWb5JuQoj2ViJE6d3f6AeIildkVRkqGbAH7dJBsdUuAyavjnHVv0Xq7LBFCF2++Y xa2lYUyT+EHf17BmDBz4dvVVcaZ2IBKBQCqvy3x0XUPLIwBOdYHtoEi3NB/DnXo6YAslOd unP+bikh08WhZkn2j0n2/LCMm3r20+fBvL4Wp9zmdHx6XERrK5tdiIT2lERGig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454359; a=rsa-sha256; cv=none; b=on0NqO10dIkpHm06AE8uzonWCrCKKOUcdlRjigI4qwz2VRGCBDciPbQnORxZ93Mw1FRcED XaHevrnHnAlO+rRqb+KtCHXukgngC3ExAGsxgrLTbpE3H4B/OaTennDoQGBIEgJke5Q23+ /q4RnGISKsBptVUrTeNGvF99j2VGawg5MbCaIuGhDCJKCXF/3GtiYir/3HhN/sB5UoAdNd XO9X30CsKYRlGd8av++gTqAZI0maEl8tq7076ABs/aXteCJ3M4uMJ4G6Da/LwpOfl0+7Rd Gjp6QWgv7yQdev8crWMyT95OEMbhth/zAG4oIHdpPkf5civ9G3+xmvau08m86w== 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=1722454359; 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=t94iEYGTlEAZek0OyefcwWr3WxkdDCULGqmUdOmQVaM=; b=vSzG+VIWqk7tWi5IHHoOErkQ9Er9U1F5wg7ieomZqrKtPifMFU74ttCHZC4vo6viHDWhVL npjBqcKjCbie/cuUGmSQ5XGQUVIyza4a0Nv6/O7ywx1gwhYCXehhZyM/itVJ0cJI0lWGsT pCbCyhWQZBB83qGiCkIfYqGe4JNxe5Qt96QoxgQ7FjHQxQqhvRK/XkhSfOaveN2WxJ7k3E xThbBRapNKP4bxWEPiUEsAZLRWdwTviFqliZMSvGNLZHaL95VWDNNdisYMnswGjYgwGmpN /+9br/O11PNJgPHYMmtD31Jd1MGrROjKCXv4X5SjU/B+STeAsrxMWmLlDG+6bA== 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 4WZ2LH4nZSzDst; Wed, 31 Jul 2024 19:32:39 +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 46VJWdRU094681; Wed, 31 Jul 2024 19:32:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWdeC094678; Wed, 31 Jul 2024 19:32:39 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:39 GMT Message-Id: <202407311932.46VJWdeC094678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 357378bbdedf - main - 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/main X-Git-Reftype: branch X-Git-Commit: 357378bbdedf24ce2b90e9bd831af4a9db3ec70a Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=357378bbdedf24ce2b90e9bd831af4a9db3ec70a commit 357378bbdedf24ce2b90e9bd831af4a9db3ec70a Author: Dimitry Andric AuthorDate: 2024-07-31 12:21:25 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:31:55 +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 --- 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;