From nobody Sun Aug 04 10:23:25 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 4WcFyk5mn5z5SYTK; Sun, 04 Aug 2024 10:23:26 +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 4WcFyk19d4z4CSJ; Sun, 4 Aug 2024 10:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767006; 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=iX5mmIMl3MlgRYg2rTzG5NgzZFbGZY0f/3DFc0r7J/M=; b=OwrG3d8KULO60saqTrL75nWrdONtrBJ9ihRpsamJ995Vmz9emUQLeRbtsZXZpD9Dpiq6Yy 395iRO4XFMP185GteMojMN1MQDhzFjaJ1UTeTXErb7wn35ADj+BMhyfuQ4uoTUBfVkJzrd NgwGcP5QdgQ9LNKUuI/+EKMSZz/j9kmLi3CF/w1ylukD0VXUIhIkDMW+T3lAFUInJadOi1 UrDpq6sNP/lS+FrsR4HFh7QpfYtpEApHx21LE0JxtGDDofLIoB0ymZd9e5Ccilg8WVD1C7 uQTmUfP0G3r2EAdnXMXfbE4Zj70UWjp1VuajRpuI1MivLiLhsPXb3v+S6PmBBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767006; a=rsa-sha256; cv=none; b=t4sollsSwBCwsdtGy9NokTipAsmU8r58RNO5BXy1ePRA0o95pJxOjI7UBoO1hSz+wFkS/p QgcjoNPBJQQ/GIUSRcy1jztntG8SGdrEfqAc4/lTVxRTlPMHFYzc4ZsGpMg37JZR82ogEQ hiYHGEIz7YaJL1LJLNG6V4vqQM6WOms3z27MWx48d+uhQH0eOv0scmzGkanpPSyBacRmjZ Baze1k9r0kLDpNHSwDx5yWlCRe7wp+Cpknncjuz853M+NjZSguzAvnkT3HhL7QgOzagdDI obq7VTFt1hnuDh7mt0AX0A89ITkCqDA3jth+i/eW99f1Ebb3D6FSnHG5VmuvAg== 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=1722767006; 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=iX5mmIMl3MlgRYg2rTzG5NgzZFbGZY0f/3DFc0r7J/M=; b=YUGkS2Ia7yOeowAD+75dZ4GvMVLJ5bw/1OgCUwPw/sD7opNzsSVwLZ1dd6Tg6JwokkLTjV BfqoBuQHRJ5sk3H6XA2aMF8K7kZSAxEWSFSEmdd2N3+On69OZkmqW91USHJfomxf9/t5tO 022+gN4JUSIBvBF++oZA6L5LdNR1Ma8JcXCZ+OX+kvJXGz6vinZiiYxxLiFsvtwrBo0YaX CHKHl/rBHQ9o5hD21sKx9bx+tWVcX7TixpOm9psjn6zOUmMA6Brkn2bak2d0RVKtAJuyfq tD2JKGaag0yPXO+pOkN1bQm5PaWYOw7G0NV9jsRu+qZbidyF1x22dnPUHvZoBA== 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 4WcFyk0nW3zs8j; Sun, 4 Aug 2024 10:23:26 +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 474ANQ2f045827; Sun, 4 Aug 2024 10:23:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474ANPGg045824; Sun, 4 Aug 2024 10:23:25 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:23:25 GMT Message-Id: <202408041023.474ANPGg045824@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: 646d5b96b41d - stable/14 - Fix enum warning in iavf 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: 646d5b96b41db9296a64569a58f83a7af11cd9ca Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=646d5b96b41db9296a64569a58f83a7af11cd9ca commit 646d5b96b41db9296a64569a58f83a7af11cd9ca Author: Dimitry Andric AuthorDate: 2024-07-31 11:01:20 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:21:33 +0000 Fix enum warning in iavf This fixes a clang 19 warning: sys/dev/iavf/iavf_lib.c:514:39: error: comparison of different enumeration types ('enum virtchnl_vsi_type' and 'enum iavf_vsi_type') [-Werror,-Wenum-compare] 514 | if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ The `vsi_type` field of `struct virtchnl_vsi_resource` is of type `enum virtchnl_vsi_type`, not `enum iavf_vsi_type`. In this case, we can seamlessly replace the value with `VIRTCHNL_VSI_SRIOV`, which is numerically equal to `IAVF_VSI_SRIOV`. MFC after: 3 days (cherry picked from commit 67be1e195acfaec99ce4fffeb17111ce085755f7) --- sys/dev/iavf/iavf_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iavf/iavf_lib.c b/sys/dev/iavf/iavf_lib.c index 883a722b3a03..f80e3765448f 100644 --- a/sys/dev/iavf/iavf_lib.c +++ b/sys/dev/iavf/iavf_lib.c @@ -511,7 +511,7 @@ iavf_get_vsi_res_from_vf_res(struct iavf_sc *sc) for (int i = 0; i < sc->vf_res->num_vsis; i++) { /* XXX: We only use the first VSI we find */ - if (sc->vf_res->vsi_res[i].vsi_type == IAVF_VSI_SRIOV) + if (sc->vf_res->vsi_res[i].vsi_type == VIRTCHNL_VSI_SRIOV) sc->vsi_res = &sc->vf_res->vsi_res[i]; } if (!sc->vsi_res) {