From d6d83b34ee3486d2154c1c929900d329448cb6c0 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 28 Feb 2019 11:02:25 -0800 Subject: vc4: Reuse list_for_each_entry_rev(). --- src/gallium/drivers/vc4/vc4_qpu_schedule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/drivers/vc4/vc4_qpu_schedule.c b/src/gallium/drivers/vc4/vc4_qpu_schedule.c index 9141396c872..7bd3e179539 100644 --- a/src/gallium/drivers/vc4/vc4_qpu_schedule.c +++ b/src/gallium/drivers/vc4/vc4_qpu_schedule.c @@ -452,13 +452,13 @@ calculate_forward_deps(struct vc4_compile *c, struct list_head *schedule_list) static void calculate_reverse_deps(struct vc4_compile *c, struct list_head *schedule_list) { - struct list_head *node; struct schedule_state state; memset(&state, 0, sizeof(state)); state.dir = R; - for (node = schedule_list->prev; schedule_list != node; node = node->prev) { + list_for_each_entry_rev(struct schedule_node, node, schedule_list, + link) { calculate_deps(&state, (struct schedule_node *)node); } } -- cgit v1.2.3