]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdkfd: Identical code for different branches
authorSunday Clement <Sunday.Clement@amd.com>
Fri, 23 May 2025 21:49:50 +0000 (17:49 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 May 2025 14:56:54 +0000 (10:56 -0400)
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.

Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c

index 981d9adcc5e1d23217305069b9f7556cfd8fd343..73acbe0b7c2124d1d4d543dd03d6e9c92d6e1a45 100644 (file)
@@ -91,7 +91,6 @@ static void cik_event_interrupt_wq(struct kfd_node *dev,
        const struct cik_ih_ring_entry *ihre =
                        (const struct cik_ih_ring_entry *)ih_ring_entry;
        uint32_t context_id = ihre->data & 0xfffffff;
-       unsigned int vmid  = (ihre->ring_id & 0x0000ff00) >> 8;
        u32 pasid = (ihre->ring_id & 0xffff0000) >> 16;
 
        if (pasid == 0)
@@ -125,11 +124,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);
        }
 }