]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Ignored various return code
authorAndrew Martin <andrew.martin@amd.com>
Tue, 11 Nov 2025 21:43:45 +0000 (16:43 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 3 Feb 2026 21:46:31 +0000 (16:46 -0500)
The return code of a non void function should not be ignored. In cases
where we do not care, the code needs to suppress it.

Signed-off-by: Andrew Martin <andrew.martin@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_debug.c

index 877d0df50376a792b9ef12be598b82abef4a1481..3bfd79c89df329510bd78bbe416ef356a692118e 100644 (file)
@@ -317,8 +317,7 @@ int amdgpu_amdkfd_post_reset(struct amdgpu_device *adev)
 void amdgpu_amdkfd_gpu_reset(struct amdgpu_device *adev)
 {
        if (amdgpu_device_should_recover_gpu(adev))
-               amdgpu_reset_domain_schedule(adev->reset_domain,
-                                            &adev->kfd.reset_work);
+               (void)amdgpu_reset_domain_schedule(adev->reset_domain, &adev->kfd.reset_work);
 }
 
 int amdgpu_amdkfd_alloc_kernel_mem(struct amdgpu_device *adev, size_t size,
@@ -720,9 +719,8 @@ void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
                if (gfx_block != NULL)
                        gfx_block->version->funcs->set_powergating_state((void *)gfx_block, state);
        }
-       amdgpu_dpm_switch_power_profile(adev,
-                                       PP_SMC_POWER_PROFILE_COMPUTE,
-                                       !idle);
+       (void)amdgpu_dpm_switch_power_profile(adev, PP_SMC_POWER_PROFILE_COMPUTE, !idle);
+
 }
 
 bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid)
index 88621cb7d409839c7886e089e4f70b58abe8e782..732ad1224a61969bb68bdc1bd55d910211593230 100644 (file)
@@ -2804,8 +2804,12 @@ static int runtime_enable(struct kfd_process *p, uint64_t r_debug,
                 * SET_SHADER_DEBUGGER clears any stale process context data
                 * saved in MES.
                 */
-               if (pdd->dev->kfd->shared_resources.enable_mes)
-                       kfd_dbg_set_mes_debug_mode(pdd, !kfd_dbg_has_cwsr_workaround(pdd->dev));
+               if (pdd->dev->kfd->shared_resources.enable_mes) {
+                       ret = kfd_dbg_set_mes_debug_mode(
+                               pdd, !kfd_dbg_has_cwsr_workaround(pdd->dev));
+                       if (ret)
+                               return ret;
+               }
        }
 
        p->runtime_info.runtime_state = DEBUG_RUNTIME_STATE_ENABLED;
index 8f8a0975f1a7df2d8096259b1c46c02398e911dc..1dae317858e932fb703898f8be59187c57d5ef0a 100644 (file)
@@ -575,9 +575,9 @@ int kfd_dbg_trap_set_flags(struct kfd_process *target, uint32_t *flags)
                                continue;
 
                        if (!pdd->dev->kfd->shared_resources.enable_mes)
-                               debug_refresh_runlist(pdd->dev->dqm);
+                               (void)debug_refresh_runlist(pdd->dev->dqm);
                        else
-                               kfd_dbg_set_mes_debug_mode(pdd, true);
+                               (void)kfd_dbg_set_mes_debug_mode(pdd, true);
                }
        }
 
@@ -637,9 +637,10 @@ void kfd_dbg_trap_deactivate(struct kfd_process *target, bool unwind, int unwind
                        pr_err("Failed to release debug vmid on [%i]\n", pdd->dev->id);
 
                if (!pdd->dev->kfd->shared_resources.enable_mes)
-                       debug_refresh_runlist(pdd->dev->dqm);
+                       (void)debug_refresh_runlist(pdd->dev->dqm);
                else
-                       kfd_dbg_set_mes_debug_mode(pdd, !kfd_dbg_has_cwsr_workaround(pdd->dev));
+                       (void)kfd_dbg_set_mes_debug_mode(pdd,
+                                                        !kfd_dbg_has_cwsr_workaround(pdd->dev));
        }
 
        kfd_dbg_set_workaround(target, false);