diff options
| author | YiPeng Chai <[email protected]> | 2024-04-25 07:53:03 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-04-30 13:59:14 +0000 |
| commit | 3ca73073f46a74dd53c3c1222c2486a593052e72 (patch) | |
| tree | be54b0fed99e553a0a1e8e409c46fc191b3c28dd /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
| parent | rm/amdgpu: Remove unused code (diff) | |
| download | kernel-3ca73073f46a74dd53c3c1222c2486a593052e72.tar.gz kernel-3ca73073f46a74dd53c3c1222c2486a593052e72.zip | |
drm/amdgpu: Remove redundant function call
Remove redundant function call.
Signed-off-by: YiPeng Chai <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 0522533c9182..a037e8fba29f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -2804,8 +2804,8 @@ static void amdgpu_ras_do_page_retirement(struct work_struct *work) mutex_unlock(&con->umc_ecc_log.lock); } -static int amdgpu_ras_query_ecc_status(struct amdgpu_device *adev, - enum amdgpu_ras_block ras_block, uint32_t timeout_ms) +static void amdgpu_ras_poison_creation_handler(struct amdgpu_device *adev, + uint32_t timeout_ms) { int ret = 0; struct ras_ecc_log_info *ecc_log; @@ -2814,7 +2814,7 @@ static int amdgpu_ras_query_ecc_status(struct amdgpu_device *adev, struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); memset(&info, 0, sizeof(info)); - info.head.block = ras_block; + info.head.block = AMDGPU_RAS_BLOCK__UMC; ecc_log = &ras->umc_ecc_log; ecc_log->de_updated = false; @@ -2822,7 +2822,7 @@ static int amdgpu_ras_query_ecc_status(struct amdgpu_device *adev, ret = amdgpu_ras_query_error_status(adev, &info); if (ret) { dev_err(adev->dev, "Failed to query ras error! ret:%d\n", ret); - return ret; + return; } if (timeout && !ecc_log->de_updated) { @@ -2833,21 +2833,11 @@ static int amdgpu_ras_query_ecc_status(struct amdgpu_device *adev, if (timeout_ms && !timeout) { dev_warn(adev->dev, "Can't find deferred error\n"); - return -ETIMEDOUT; + return; } - return 0; -} - -static void amdgpu_ras_poison_creation_handler(struct amdgpu_device *adev, - uint32_t timeout) -{ - struct amdgpu_ras *con = amdgpu_ras_get_context(adev); - int ret; - - ret = amdgpu_ras_query_ecc_status(adev, AMDGPU_RAS_BLOCK__UMC, timeout); if (!ret) - schedule_delayed_work(&con->page_retirement_dwork, 0); + schedule_delayed_work(&ras->page_retirement_dwork, 0); } static int amdgpu_ras_poison_consumption_handler(struct amdgpu_device *adev, |
