Commit ebf947fe authored by Felix Kuehling's avatar Felix Kuehling Committed by Oded Gabbay

drm/amdkfd: remove redundant kfd_event_waiter.input_index

This always identical with the index of the event_waiter in the array.
No need to store it in the waiter record.
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
parent fe528c13
......@@ -49,7 +49,6 @@ struct kfd_event_waiter {
/* Event */
struct kfd_event *event;
uint32_t input_index;
};
/*
......@@ -625,8 +624,7 @@ static struct kfd_event_waiter *alloc_event_waiters(uint32_t num_events)
static int init_event_waiter_get_status(struct kfd_process *p,
struct kfd_event_waiter *waiter,
uint32_t event_id,
uint32_t input_index)
uint32_t event_id)
{
struct kfd_event *ev = lookup_event_by_id(p, event_id);
......@@ -634,7 +632,6 @@ static int init_event_waiter_get_status(struct kfd_process *p,
return -EINVAL;
waiter->event = ev;
waiter->input_index = input_index;
waiter->activated = ev->signaled;
ev->signaled = ev->signaled && !ev->auto_reset;
......@@ -702,7 +699,7 @@ static int copy_signaled_event_data(uint32_t num_events,
waiter = &event_waiters[i];
event = waiter->event;
if (waiter->activated && event->type == KFD_EVENT_TYPE_MEMORY) {
dst = &data[waiter->input_index].memory_exception_data;
dst = &data[i].memory_exception_data;
src = &event->memory_exception_data;
if (copy_to_user(dst, src,
sizeof(struct kfd_hsa_memory_exception_data)))
......@@ -775,7 +772,7 @@ int kfd_wait_on_events(struct kfd_process *p,
}
ret = init_event_waiter_get_status(p, &event_waiters[i],
event_data.event_id, i);
event_data.event_id);
if (ret)
goto out_unlock;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment