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: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
Felix Kuehling 2017-10-27 19:35:24 -04:00 committed by Oded Gabbay
parent fe528c13ac
commit ebf947fe93

View File

@ -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;
}