drm/amd/amdgpu: remove redundant flush_delayed_work
authorJingwen Chen <Jingwen.Chen2@amd.com>
Mon, 18 Jan 2021 02:30:36 +0000 (10:30 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 20 Jan 2021 21:38:17 +0000 (16:38 -0500)
When using cancel_delayed_work_sync, there's no need
to flush_delayed_work first. This sequence can lead to
a redundant loop of work executing.

Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

index e223fca..abe538b 100644 (file)
@@ -571,7 +571,6 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev)
 {
        if (adev->virt.vf2pf_update_interval_ms != 0) {
                DRM_INFO("clean up the vf2pf work item\n");
-               flush_delayed_work(&adev->virt.vf2pf_work);
                cancel_delayed_work_sync(&adev->virt.vf2pf_work);
                adev->virt.vf2pf_update_interval_ms = 0;
        }