Skip to contentSkip to conversation

drm/amdkfd: Ignored various return code

PATCH New Andrew Martin 1 participant 1 message Nov 11, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: Ignored various return code

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.

---
 drivers/gpu/drm/amd/amdkfd/kfd_debug.c                | 9 +++++----
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 ++++--
 2 files changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_debug.c +5 -4
index ba99e0f258ae..cfa3f0d1888a 100644
@@ -565,9 +565,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);
 		}
 	}
 
@@ -627,9 +627,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);
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +4 -2
index 76359c6a3f3a..dbcb64501cfa 100644
@@ -1891,9 +1891,11 @@ static int stop_cpsch(struct device_queue_manager *dqm)
 	}
 
 	if (!dqm->dev->kfd->shared_resources.enable_mes)
-		unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0, USE_DEFAULT_GRACE_PERIOD, false);
+		(void)unmap_queues_cpsch(dqm,
+					 KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES,
+					 0, USE_DEFAULT_GRACE_PERIOD, false);
 	else
-		remove_all_kfd_queues_mes(dqm);
+		(void)remove_all_kfd_queues_mes(dqm);
 
 	dqm->sched_running = false;
 
Signature · 1 line
2.43.0