diff options
author | Brett Creeley <brett.creeley@intel.com> | 2019-02-08 12:50:54 -0800 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-03-19 16:54:23 -0700 |
commit | 80ed404abb480563aaefef28accc69801a95f964 (patch) | |
tree | 3431aee8ffa726e919b85e8593f4c2c1e6d2b3f9 /drivers/net/ethernet/intel/ice/ice_ethtool.c | |
parent | d8df260af70f8b8a9f23466f569c820a90e91696 (diff) |
ice: use ice_for_each_vsi macro when possible
Replace all instances of:
for (i = 0; i < pf->num_alloc_vsi; i++)
with the following macro:
ice_for_each_vsi(pf, i)
This will allow the code to be consistent since there are currently
cases of using both.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index eb8d149e317c..1bb333c3fdc5 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -1400,13 +1400,12 @@ ice_set_link_ksettings(struct net_device *netdev, return -EOPNOTSUPP; /* Check if this is lan vsi */ - for (idx = 0 ; idx < pf->num_alloc_vsi ; idx++) { + ice_for_each_vsi(pf, idx) if (pf->vsi[idx]->type == ICE_VSI_PF) { if (np->vsi != pf->vsi[idx]) return -EOPNOTSUPP; break; } - } if (p->phy.media_type != ICE_MEDIA_BASET && p->phy.media_type != ICE_MEDIA_FIBER && |