diff options
author | Brett Creeley <brett.creeley@intel.com> | 2019-02-28 18:25:53 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-05-02 04:09:51 -0400 |
commit | 0c2561c81f5d089781f7cb24b8ce9e52ac716f61 (patch) | |
tree | 4b236b339f1f03350862746af6f47264f4080765 /drivers/net/ethernet/intel/ice/ice_lib.c | |
parent | a92e1bb6ade7526f0c2b7b462516b1941e965504 (diff) |
ice: Use ice_for_each_q_vector macro where possible
There are many places in the code where we do the following:
for (i = 0; i < vsi->num_q_vectors; i++)
Instead use the macro mentioned in the commit title:
ice_for_each_q_vector(vsi, i)
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_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 57b2873a6123..e75d8c4fadc6 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
@@ -1054,7 +1054,7 @@ void ice_vsi_free_q_vectors(struct ice_vsi *vsi) | |||
1054 | { | 1054 | { |
1055 | int v_idx; | 1055 | int v_idx; |
1056 | 1056 | ||
1057 | for (v_idx = 0; v_idx < vsi->num_q_vectors; v_idx++) | 1057 | ice_for_each_q_vector(vsi, v_idx) |
1058 | ice_free_q_vector(vsi, v_idx); | 1058 | ice_free_q_vector(vsi, v_idx); |
1059 | } | 1059 | } |
1060 | 1060 | ||
@@ -2409,7 +2409,7 @@ void ice_vsi_free_irq(struct ice_vsi *vsi) | |||
2409 | return; | 2409 | return; |
2410 | 2410 | ||
2411 | vsi->irqs_ready = false; | 2411 | vsi->irqs_ready = false; |
2412 | for (i = 0; i < vsi->num_q_vectors; i++) { | 2412 | ice_for_each_q_vector(vsi, i) { |
2413 | u16 vector = i + base; | 2413 | u16 vector = i + base; |
2414 | int irq_num; | 2414 | int irq_num; |
2415 | 2415 | ||
@@ -2633,7 +2633,7 @@ void ice_vsi_dis_irq(struct ice_vsi *vsi) | |||
2633 | wr32(hw, GLINT_DYN_CTL(i), 0); | 2633 | wr32(hw, GLINT_DYN_CTL(i), 0); |
2634 | 2634 | ||
2635 | ice_flush(hw); | 2635 | ice_flush(hw); |
2636 | for (i = 0; i < vsi->num_q_vectors; i++) | 2636 | ice_for_each_q_vector(vsi, i) |
2637 | synchronize_irq(pf->msix_entries[i + base].vector); | 2637 | synchronize_irq(pf->msix_entries[i + base].vector); |
2638 | } | 2638 | } |
2639 | } | 2639 | } |