aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_lib.c
diff options
context:
space:
mode:
authorBrett Creeley <[email protected]>2019-12-12 11:12:56 +0000
committerJeff Kirsher <[email protected]>2020-01-04 00:08:33 +0000
commit005881bcf99d11f1e409e286f57fc10ee41af224 (patch)
tree9e2c2cefc41bc6616216a62e9966a2fa9a3ab0c8 /drivers/net/ethernet/intel/ice/ice_lib.c
parentice: Add code to keep track of current dflt_vsi (diff)
downloadkernel-005881bcf99d11f1e409e286f57fc10ee41af224.tar.gz
kernel-005881bcf99d11f1e409e286f57fc10ee41af224.zip
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 <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
0 files changed, 0 insertions, 0 deletions