Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc73234b authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher
Browse files

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: default avatarMitch Williams <mitch.a.williams@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d8a87856
Loading
Loading
Loading
Loading
+8 −10
Original line number Original line Diff line number Diff line
@@ -5265,7 +5265,7 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
	if (ret) {
	if (ret) {
		struct i40e_aqc_query_vsi_bw_config_resp bw_config = {0};
		struct i40e_aqc_query_vsi_bw_config_resp bw_config = {0};


		dev_info(&vsi->back->pdev->dev,
		dev_info(&pf->pdev->dev,
			 "Failed configuring TC map %d for VSI %d\n",
			 "Failed configuring TC map %d for VSI %d\n",
			 enabled_tc, vsi->seid);
			 enabled_tc, vsi->seid);
		ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid,
		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)
	/* Update the VSI after updating the VSI queue-mapping
	/* Update the VSI after updating the VSI queue-mapping
	 * information
	 * information
	 */
	 */
	ret = i40e_aq_update_vsi_params(&vsi->back->hw, &ctxt, NULL);
	ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
	if (ret) {
	if (ret) {
		dev_info(&vsi->back->pdev->dev,
		dev_info(&pf->pdev->dev,
			 "Update vsi tc config failed, err %s aq_err %s\n",
			 "Update vsi tc config failed, err %s aq_err %s\n",
			 i40e_stat_str(&vsi->back->hw, ret),
			 i40e_stat_str(hw, ret),
			 i40e_aq_str(&vsi->back->hw,
			 i40e_aq_str(hw, hw->aq.asq_last_status));
				     vsi->back->hw.aq.asq_last_status));
		goto out;
		goto out;
	}
	}
	/* update the local VSI info with updated queue map */
	/* 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)
	/* Update current VSI BW information */
	/* Update current VSI BW information */
	ret = i40e_vsi_get_bw_info(vsi);
	ret = i40e_vsi_get_bw_info(vsi);
	if (ret) {
	if (ret) {
		dev_info(&vsi->back->pdev->dev,
		dev_info(&pf->pdev->dev,
			 "Failed updating vsi bw info, err %s aq_err %s\n",
			 "Failed updating vsi bw info, err %s aq_err %s\n",
			 i40e_stat_str(&vsi->back->hw, ret),
			 i40e_stat_str(hw, ret),
			 i40e_aq_str(&vsi->back->hw,
			 i40e_aq_str(hw, hw->aq.asq_last_status));
				     vsi->back->hw.aq.asq_last_status));
		goto out;
		goto out;
	}
	}