Commit af72f53c authored by Longfang Liu's avatar Longfang Liu Committed by Alex Williamson
Browse files

hisi_acc_vfio_pci: Remove useless function parameter



Remove unused function parameters for vf_qm_fun_reset() and
ensure the device is enabled before the reset operation
is performed.

Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarLongfang Liu <liulongfang@huawei.com>
Link: https://lore.kernel.org/r/20220926093332.28824-4-liulongfang@huawei.com


Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 008e5e99
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -337,8 +337,7 @@ static int vf_qm_cache_wb(struct hisi_qm *qm)
	return 0;
	return 0;
}
}


static void vf_qm_fun_reset(struct hisi_acc_vf_core_device *hisi_acc_vdev,
static void vf_qm_fun_reset(struct hisi_qm *qm)
			    struct hisi_qm *qm)
{
{
	int i;
	int i;


@@ -662,7 +661,10 @@ static void hisi_acc_vf_start_device(struct hisi_acc_vf_core_device *hisi_acc_vd
	if (hisi_acc_vdev->vf_qm_state != QM_READY)
	if (hisi_acc_vdev->vf_qm_state != QM_READY)
		return;
		return;


	vf_qm_fun_reset(hisi_acc_vdev, vf_qm);
	/* Make sure the device is enabled */
	qm_dev_cmd_init(vf_qm);

	vf_qm_fun_reset(vf_qm);
}
}


static int hisi_acc_vf_load_state(struct hisi_acc_vf_core_device *hisi_acc_vdev)
static int hisi_acc_vf_load_state(struct hisi_acc_vf_core_device *hisi_acc_vdev)