summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-02-28 11:02:25 -0800
committerEric Anholt <[email protected]>2019-03-11 13:14:32 -0700
commitd6d83b34ee3486d2154c1c929900d329448cb6c0 (patch)
treec8dea0478553a99240001615ad1c697a01730b58 /src/gallium
parent7c01ddbf7f1a543475e42a9854f0e3c60391012b (diff)
vc4: Reuse list_for_each_entry_rev().
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_schedule.c4
1 files changed, 2 insertions, 2 deletions
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);
}
}