From nobody Sun Aug 04 10:24:11 2024 X-Original-To: dev-commits-src-branches@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 4WcFzb3H0dz5SYTk; Sun, 04 Aug 2024 10:24:11 +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 4WcFzb1jhDz4Dpm; Sun, 4 Aug 2024 10:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767051; 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=dcV50mpxXRC653rJYHbjjcjB9PlZi9SEx6fW4kQuS1k=; b=CpmfhKwwJ53OVIshAFD6nREO4GEAmEkvzsBywBXWL0Wc4e1gdrKjgL+Syx2zkoJSE/Onqi f/S9LN7Ht3EZrsk0HLb283tbP+jZR1JQUmo/KTPBkZLntzwYfY7Nb7TTO1VxMPSabeXTi4 kHjBhqO3bfwG0zoul1oc1+GyYJJFCnenv7IKlsKXx6vrd6ma8NvLxUqpZppUTDNKxVvPMZ VqUl8Jsp7kTQn9VhWQoNqEWZzA4asfFjBuN4IiUTaV7u+l+ls0+1yxg63mh6VlR8EhJG7s y5yJI2Fsdzy0agMc5r57j7lD8x5Kxh6kAzs61OXMFAx9TZhMluGda/3m6niv9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767051; a=rsa-sha256; cv=none; b=QXKOXrgnhOHriZHWeh6ToEfLrOu5Dzd13GEWeLer4ZLNdfQP0zoDXK+pfELQPhK8N/+BuO 5eWGf++vdb8ccsRj4PT0ojxnG83UltbsLniak+83P1hQ8Iel46CCrTyLyjLuPduEKK8fMB BfeVRqtTt80KFh108lQ8S60JeL3symHqajAN8DpvCcmaiya5xt8GMGfUaeP85N7shTERmL kCXq2TN9gwv6DZVNY6C0TfYtcXCxWMm0EhcGR5ZhzOH+Njy8F3sz+zNgx/vHA3OqUdydGQ CFO6cin+xdO1wNkoZYc4k4wpjPeklfDw6BmxBGw8znCxPG4tjunr/TSCjvyNqQ== 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=1722767051; 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=dcV50mpxXRC653rJYHbjjcjB9PlZi9SEx6fW4kQuS1k=; b=w68hcUMjDr7OQKjQwep/AxgklxQg8m/t2K7djnkt5D/ptaosVs4k2LnD28K51QpbBaZSyd 12LHx71jlqWa9lntiX4W75qBHfUizdO718TWHGcNYsZi+Tqv5llV4acwxw5Bedu0Jnh9HB X1MNMfxfeK6OT4rO1Tb1PkRMwJaimQ0k5MinwcftfuJ1VRW5FnNbwpFNUOquWZP6oLEStA y9Pv79aGaVAJgKFnEIkkUvKfe+Z+pDBpPr6pgZnRIUNxLAUJ43PkcS4SEi6yFBrkekE9rT 5Xs93auV7te851dFrEy88RqQRHrv1bgnSC39VBkWaAasKdThDqnxFhVYEU3YiA== 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 4WcFzb1KYtzrds; Sun, 4 Aug 2024 10:24:11 +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 474AOB2j046217; Sun, 4 Aug 2024 10:24:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474AOBRF046214; Sun, 4 Aug 2024 10:24:11 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:24:11 GMT Message-Id: <202408041024.474AOBRF046214@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: 8356d8ff63a3 - stable/13 - Fix enum warning in iavf List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 8356d8ff63a3ffab8b1ff91c922ca7865de9dfc3 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8356d8ff63a3ffab8b1ff91c922ca7865de9dfc3 commit 8356d8ff63a3ffab8b1ff91c922ca7865de9dfc3 Author: Dimitry Andric AuthorDate: 2024-07-31 11:01:20 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:23:02 +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 15e9a334c7fe..bac6d0948c32 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) {