Skip to content

Commit 442b25e

Browse files
mawilli1Jeff Kirsher
authored andcommitted
i40e: Remove unused variable
This variable is vestigial, a remnant of the primordial code from which this driver spawned. We can safely remove it. Change-ID: I24e0fe338e7c7c50d27dc5515564f33caefbb93a Signed-off-by: Mitch Williams <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 3845cce commit 442b25e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,8 +1311,8 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
13111311
struct i40e_pf *pf = vf->pf;
13121312
i40e_status aq_ret = 0;
13131313
struct i40e_vsi *vsi;
1314-
int i = 0, len = 0;
13151314
int num_vsis = 1;
1315+
int len = 0;
13161316
int ret;
13171317

13181318
if (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states)) {
@@ -1374,15 +1374,14 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
13741374
vfres->num_queue_pairs = vf->num_queue_pairs;
13751375
vfres->max_vectors = pf->hw.func_caps.num_msix_vectors_vf;
13761376
if (vf->lan_vsi_idx) {
1377-
vfres->vsi_res[i].vsi_id = vf->lan_vsi_id;
1378-
vfres->vsi_res[i].vsi_type = I40E_VSI_SRIOV;
1379-
vfres->vsi_res[i].num_queue_pairs = vsi->alloc_queue_pairs;
1377+
vfres->vsi_res[0].vsi_id = vf->lan_vsi_id;
1378+
vfres->vsi_res[0].vsi_type = I40E_VSI_SRIOV;
1379+
vfres->vsi_res[0].num_queue_pairs = vsi->alloc_queue_pairs;
13801380
/* VFs only use TC 0 */
1381-
vfres->vsi_res[i].qset_handle
1381+
vfres->vsi_res[0].qset_handle
13821382
= le16_to_cpu(vsi->info.qs_handle[0]);
1383-
ether_addr_copy(vfres->vsi_res[i].default_mac_addr,
1383+
ether_addr_copy(vfres->vsi_res[0].default_mac_addr,
13841384
vf->default_lan_addr.addr);
1385-
i++;
13861385
}
13871386
set_bit(I40E_VF_STAT_ACTIVE, &vf->vf_states);
13881387

0 commit comments

Comments
 (0)