drm/amdgpu: Move the dumping log out of for loop

log message "Dumping IP State Completed" needs to
be logged only once when state dumping is complete.

Hence moving it out of the for loop.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Acked-by: Trigger Huang <Trigger.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Sunil Khatri 2024-08-28 13:36:23 +05:30 committed by Alex Deucher
parent af76ca8e18
commit 30e8f4c2bd

View File

@ -39,12 +39,11 @@ static void amdgpu_job_do_core_dump(struct amdgpu_device *adev,
int i;
dev_info(adev->dev, "Dumping IP State\n");
for (i = 0; i < adev->num_ip_blocks; i++) {
for (i = 0; i < adev->num_ip_blocks; i++)
if (adev->ip_blocks[i].version->funcs->dump_ip_state)
adev->ip_blocks[i].version->funcs
->dump_ip_state((void *)adev);
dev_info(adev->dev, "Dumping IP State Completed\n");
}
amdgpu_coredump(adev, true, false, job);
}