From nobody Wed Jul 31 19:32:37 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 4WZ2LF6BPJz5RD2j; Wed, 31 Jul 2024 19:32:37 +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 4WZ2LF3DMwz4YrS; Wed, 31 Jul 2024 19:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454357; 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=Ii39Mgbq/+hOqPJUixbAUBo7be7a3tmrpJ0D/c3Hrrg=; b=Hph2/2/++0DyKxctJXmTV7eqNKqaUOxPtswW90N+TA5c4DkMY/CfAYYffrAYYC84cBG8cY 8xnd5oh5DIrj1YIvBEJtWc8AD5H61W3aqYmuRYUAgnsKoq67NrCKqaCxaYtOYkcEyAPqus SrIVZApoVdz6a/67actBk13ztixt/72MKnO5zVjPiJR4OocrAmmDpziF9y0L6o3vu2j9Xk nOwLKB05/vaFPVic1nPtphoY9OsKIuaX+cHQyjqbVJezT/BfwHG63m4Z/mkCXhjxMP+vCE 6bcuyGar9AmHjKz6R5NDPW+T+f+A8GjGbNlBv74LoVDdvMXdEzgCwgh69FJaPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454357; a=rsa-sha256; cv=none; b=Yz+i6SPRQraZYrRZQDE8Tis9T6le3hMVTpQ8KIS5pOfdnqpJqBGYQ6oWrgDETxyMOhPlz8 V16RfjoCMCl9Bryerk3DtF2A0TAZVdLRfygxXM+Gmw+IR9TYQ5GOhOPMmBCLs0NMT5QTqT yOaSk5NN3HjgDriN5LMSKOsfMjGpWzsvpdxeIfVGSmgqKWVdpQkBixAsOlfFpEWHgxsQhq IjanXXW9GKLhSmzbRdlw+hiufbZ7HA2zpe8QgMPloTzlqWuAx0Y76rBVjW8oSInt/KOXII WLYJvMy4MIvGarWzUTCJM62/o/evW49jRZUwcbZcc67wN8svUro+NQEDNP8Gag== 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=1722454357; 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=Ii39Mgbq/+hOqPJUixbAUBo7be7a3tmrpJ0D/c3Hrrg=; b=d3TnkgMx7v3z+Nkhz2WoO84X9pYiutkllZweGNTFPM99lQF0xPRYRV6oJ5y6f8+4FFraWx mA6Ck+moFhTq4FYsy6P4OiRhd1KUjLjhJhOVZXVaCa9/Aq1a98YGGl/EsprB+cOOWMeo+l S64OterUWKxNafT7crstr+xmsqm/4zhQH5+iWRfDUxEIAlbyPASIUpK7qXuNSM3uI7WhZ7 re8mlPfbt8XLE3KEWt97iQIUbQmYffgzXCa4dP/aCg9ltW7poQb/rwff4mGjH/UAjIHSwc eTa6DceHNCmpWad13j6zkWlQUIyDdz1BfZdx3fvq8ewjIdY6cyHQfmUGMCPo2w== 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 4WZ2LF2rPczDgL; Wed, 31 Jul 2024 19:32:37 +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 46VJWb7W094593; Wed, 31 Jul 2024 19:32:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWbbC094590; Wed, 31 Jul 2024 19:32:37 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:37 GMT Message-Id: <202407311932.46VJWbbC094590@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: 67be1e195acf - main - 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/main X-Git-Reftype: branch X-Git-Commit: 67be1e195acfaec99ce4fffeb17111ce085755f7 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=67be1e195acfaec99ce4fffeb17111ce085755f7 commit 67be1e195acfaec99ce4fffeb17111ce085755f7 Author: Dimitry Andric AuthorDate: 2024-07-31 11:01:20 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:31:46 +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 --- 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) {