summaryrefslogtreecommitdiff
path: root/drivers/fpga/xilinx-spi.c
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2023-11-24 16:03:40 +0100
committerTony Nguyen <anthony.l.nguyen@intel.com>2024-02-16 09:28:14 -0800
commitb1f1b46f466a0855b92bd191d8fea8bf297bc7ab (patch)
treed6508e5acf2cf1ca5d69e24f7ed837705d815db5 /drivers/fpga/xilinx-spi.c
parent7e6cec7d3bb0ae2107cda6175bbf3b0275ca0d09 (diff)
downloadlinux-b1f1b46f466a0855b92bd191d8fea8bf297bc7ab.tar.gz
linux-b1f1b46f466a0855b92bd191d8fea8bf297bc7ab.tar.bz2
linux-b1f1b46f466a0855b92bd191d8fea8bf297bc7ab.zip
i40e: Introduce and use macros for iterating VSIs and VEBs
Introduce i40e_for_each_vsi() and i40e_for_each_veb() helper macros and use them to iterate relevant arrays. Replace pattern: for (i = 0; i < pf->num_alloc_vsi; i++) by: i40e_for_each_vsi(pf, i, vsi) and pattern: for (i = 0; i < I40E_MAX_VEB; i++) by i40e_for_each_veb(pf, i, veb) These macros also check if array item pf->vsi[i] or pf->veb[i] are not NULL and skip such items so we can remove redundant checks from loop bodies. Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
0 files changed, 0 insertions, 0 deletions