[PATCH 08/16] drm/amdkfd: remove redundant kfd_event_waiter.input_index
Oded Gabbay
oded.gabbay at gmail.com
Wed Oct 25 08:54:20 UTC 2017
On Sat, Oct 21, 2017 at 3:23 AM, Felix Kuehling <Felix.Kuehling at amd.com> wrote:
> 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 at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_events.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> index 6050e88..949b80a 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> @@ -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;
> }
> --
> 2.7.4
>
This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay at gmail.com>
More information about the amd-gfx
mailing list