> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-boun...@osuosl.org> On Behalf Of > Jacob Keller > Sent: Thursday, June 19, 2025 12:25 AM > To: Intel Wired LAN <intel-wired-...@lists.osuosl.org> > Cc: Keller, Jacob E <jacob.e.kel...@intel.com>; net...@vger.kernel.org; > Chittim, Madhu <madhu.chit...@intel.com>; Cao, Yahui > <yahui....@intel.com>; Nguyen, Anthony L <anthony.l.ngu...@intel.com>; > Kitszel, Przemyslaw <przemyslaw.kits...@intel.com> > Subject: [Intel-wired-lan] [PATCH iwl-next 6/8] ice: use pci_iov_vf_id() to > get > VF ID > > The ice_sriov_set_msix_vec_count() obtains the VF device ID in a strange way > by iterating over the possible VF IDs and calling pci_iov_virtfn_devfn to > calculate the device and function combos and compare them to the pdev- > >devfn. > > This is unnecessary. The pci_iov_vf_id() helper already exists which does the > reverse calculation of pci_iov_virtfn_devfn(), which is much simpler and > avoids > the loop construction. Use this instead. > > Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> > --- > drivers/net/ethernet/intel/ice/ice_sriov.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c > b/drivers/net/ethernet/intel/ice/ice_sriov.c > index > 8d77c387357bbba27fbcec4bb2019274d2a2eb99..4c0955be2ad20c3902cf > 891a66f857585fcab98b 100644 > --- a/drivers/net/ethernet/intel/ice/ice_sriov.c > +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c > @@ -952,17 +952,11 @@ int ice_sriov_set_msix_vec_count(struct pci_dev
Tested-by: Rafal Romanowski <rafal.romanow...@intel.com>