HomeFreeBSD

Fix enum warning in iavf

Description

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

Details

Provenance
dimAuthored on Jul 31 2024, 11:01 AM
Parents
rG8ce3e489a5ee: Fix incorrect -I option in sys/conf/Makefile.arm
Branches
Unknown
Tags
Unknown