[PATCH] drm/amdkfd: Identical code for different branches

Kasiviswanathan, Harish Harish.Kasiviswanathan at amd.com
Mon May 26 17:48:29 UTC 2025


[Public]

You can remove BUG:SWDEV-534537 from commit message as it doesn't provide any information to public. With that this patch is

Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan at amd.com.



-----Original Message-----
From: Clement, Sunday <Sunday.Clement at amd.com>
Sent: Friday, May 23, 2025 7:54 PM
To: amd-gfx at lists.freedesktop.org
Cc: Tudor, Alexandru <Alexandru.Tudor at amd.com>; Kasiviswanathan, Harish <Harish.Kasiviswanathan at amd.com>; Clement, Sunday <Sunday.Clement at amd.com>
Subject: [PATCH] drm/amdkfd: Identical code for different branches

This patch removes the if/else statement in the
cik_event_interrupt_wq function because it is redundant
with both branches resulting in identical outcomes,
this improves code readibility.

BUG:SWDEV-534537

Signed-off-by: Sunday Clement <Sunday.Clement at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c b/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
index 981d9adcc5e1..25f32771b228 100644
--- a/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
+++ b/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c
@@ -125,11 +125,7 @@ static void cik_event_interrupt_wq(struct kfd_node *dev,
                        return;
                }

-               if (info.vmid == vmid)
-                       kfd_signal_vm_fault_event(pdd, &info, NULL);
-               else
-                       kfd_signal_vm_fault_event(pdd, &info, NULL);
-
+               kfd_signal_vm_fault_event(pdd, &info, NULL);
                kfd_unref_process(p);
        }
 }
--
2.43.0



More information about the amd-gfx mailing list