aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_lib.c
diff options
context:
space:
mode:
authorBrett Creeley <brett.creeley@intel.com>2019-12-12 03:12:56 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-01-03 16:08:33 -0800
commit005881bcf99d11f1e409e286f57fc10ee41af224 (patch)
tree9e2c2cefc41bc6616216a62e9966a2fa9a3ab0c8 /drivers/net/ethernet/intel/ice/ice_lib.c
parentfc0f39bcb50cd4a414ee5d5fef5208a7d04c4c32 (diff)
ice: Add ice_for_each_vf() macro
Currently we do "for (i = 0; i < pf->num_alloc_vfs; i++)" all over the place. Many other places use macros to contain this repeated for loop, So create the macro ice_for_each_vf(pf, i) that does the same thing. There were a couple places we were using one loop variable and a VF iterator, which were changed to using a local variable within the ice_for_each_vf() macro. Also in ice_alloc_vfs() we were setting pf->num_alloc_vfs after doing "for (i = 0; i < num_alloc_vfs; i++)". Instead assign pf->num_alloc_vfs right after allocating memory for the pf->vf array. Signed-off-by: Brett Creeley <brett.creeley@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_lib.c')
0 files changed, 0 insertions, 0 deletions