Skip to content

Commit bc73234

Browse files
mawilli1Jeff Kirsher
authored andcommitted
i40e: simplify pointer dereferences
Now that i40e_vsi_config_tc() has the pf and hw variable defined, use them, instead of dereferencing vsi->back. Much easier to read. Signed-off-by: Mitch Williams <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent d8a8785 commit bc73234

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5265,7 +5265,7 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
52655265
if (ret) {
52665266
struct i40e_aqc_query_vsi_bw_config_resp bw_config = {0};
52675267

5268-
dev_info(&vsi->back->pdev->dev,
5268+
dev_info(&pf->pdev->dev,
52695269
"Failed configuring TC map %d for VSI %d\n",
52705270
enabled_tc, vsi->seid);
52715271
ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid,
@@ -5336,13 +5336,12 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
53365336
/* Update the VSI after updating the VSI queue-mapping
53375337
* information
53385338
*/
5339-
ret = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
5339+
ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
53405340
if (ret) {
5341-
dev_info(&vsi->back->pdev->dev,
5341+
dev_info(&pf->pdev->dev,
53425342
"Update vsi tc config failed, err %s aq_err %s\n",
5343-
i40e_stat_str(&vsi->back->hw, ret),
5344-
i40e_aq_str(&vsi->back->hw,
5345-
vsi->back->hw.aq.asq_last_status));
5343+
i40e_stat_str(hw, ret),
5344+
i40e_aq_str(hw, hw->aq.asq_last_status));
53465345
goto out;
53475346
}
53485347
/* update the local VSI info with updated queue map */
@@ -5352,11 +5351,10 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
53525351
/* Update current VSI BW information */
53535352
ret = i40e_vsi_get_bw_info(vsi);
53545353
if (ret) {
5355-
dev_info(&vsi->back->pdev->dev,
5354+
dev_info(&pf->pdev->dev,
53565355
"Failed updating vsi bw info, err %s aq_err %s\n",
5357-
i40e_stat_str(&vsi->back->hw, ret),
5358-
i40e_aq_str(&vsi->back->hw,
5359-
vsi->back->hw.aq.asq_last_status));
5356+
i40e_stat_str(hw, ret),
5357+
i40e_aq_str(hw, hw->aq.asq_last_status));
53605358
goto out;
53615359
}
53625360

0 commit comments

Comments
 (0)