Skip to content

Commit 1091fba

Browse files
Sundance636alexdeucher
authored andcommitted
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. Signed-off-by: Sunday Clement <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 9785921 commit 1091fba

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ static void cik_event_interrupt_wq(struct kfd_node *dev,
9191
const struct cik_ih_ring_entry *ihre =
9292
(const struct cik_ih_ring_entry *)ih_ring_entry;
9393
uint32_t context_id = ihre->data & 0xfffffff;
94-
unsigned int vmid = (ihre->ring_id & 0x0000ff00) >> 8;
9594
u32 pasid = (ihre->ring_id & 0xffff0000) >> 16;
9695

9796
if (pasid == 0)
@@ -125,11 +124,7 @@ static void cik_event_interrupt_wq(struct kfd_node *dev,
125124
return;
126125
}
127126

128-
if (info.vmid == vmid)
129-
kfd_signal_vm_fault_event(pdd, &info, NULL);
130-
else
131-
kfd_signal_vm_fault_event(pdd, &info, NULL);
132-
127+
kfd_signal_vm_fault_event(pdd, &info, NULL);
133128
kfd_unref_process(p);
134129
}
135130
}

0 commit comments

Comments
 (0)