> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Jacob Keller > Sent: Thursday, June 19, 2025 12:25 AM > To: Intel Wired LAN <[email protected]> > Cc: Keller, Jacob E <[email protected]>; [email protected]; > Chittim, Madhu <[email protected]>; Cao, Yahui > <[email protected]>; Nguyen, Anthony L <[email protected]>; > Kitszel, Przemyslaw <[email protected]> > 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 <[email protected]> > --- > 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 <[email protected]>
