Skip to content

Commit 1d4ade3

Browse files
amd-sukhatrialexdeucher
authored andcommitted
drm/amdgpu/userq: dont need check for return values in amdgpu_userq_evict
Function of amdgpu_userq_evict function do not need to check for return values as we dont use them and no need to log errors as we are already logging in called functions. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 48d1a5b commit 1d4ade3

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,8 @@ amdgpu_userq_evict_all(struct amdgpu_userq_mgr *uq_mgr)
12581258
}
12591259

12601260
if (ret)
1261-
drm_file_err(uq_mgr->file, "Couldn't unmap all the queues\n");
1261+
drm_file_err(uq_mgr->file,
1262+
"Couldn't unmap all the queues, eviction failed ret=%d\n", ret);
12621263
return ret;
12631264
}
12641265

@@ -1307,18 +1308,9 @@ amdgpu_userq_wait_for_signal(struct amdgpu_userq_mgr *uq_mgr)
13071308
void
13081309
amdgpu_userq_evict(struct amdgpu_userq_mgr *uq_mgr)
13091310
{
1310-
struct amdgpu_device *adev = uq_mgr->adev;
1311-
int ret;
1312-
13131311
/* Wait for any pending userqueue fence work to finish */
1314-
ret = amdgpu_userq_wait_for_signal(uq_mgr);
1315-
if (ret)
1316-
dev_err(adev->dev, "Not evicting userqueue, timeout waiting for work\n");
1317-
1318-
ret = amdgpu_userq_evict_all(uq_mgr);
1319-
if (ret)
1320-
dev_err(adev->dev, "Failed to evict userqueue\n");
1321-
1312+
amdgpu_userq_wait_for_signal(uq_mgr);
1313+
amdgpu_userq_evict_all(uq_mgr);
13221314
}
13231315

13241316
int amdgpu_userq_mgr_init(struct amdgpu_userq_mgr *userq_mgr, struct drm_file *file_priv,

0 commit comments

Comments
 (0)