Mesa (master): v3d: Reuse list_for_each_entry_rev().

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 11 20:15:46 UTC 2019


Module: Mesa
Branch: master
Commit: 7c01ddbf7f1a543475e42a9854f0e3c60391012b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c01ddbf7f1a543475e42a9854f0e3c60391012b

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Feb 28 11:01:57 2019 -0800

v3d: Reuse list_for_each_entry_rev().

---

 src/broadcom/compiler/qpu_schedule.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c
index e80be9c0bf1..8a7d9e84bf6 100644
--- a/src/broadcom/compiler/qpu_schedule.c
+++ b/src/broadcom/compiler/qpu_schedule.c
@@ -440,14 +440,14 @@ calculate_forward_deps(struct v3d_compile *c, struct list_head *schedule_list)
 static void
 calculate_reverse_deps(struct v3d_compile *c, struct list_head *schedule_list)
 {
-        struct list_head *node;
         struct schedule_state state;
 
         memset(&state, 0, sizeof(state));
         state.devinfo = c->devinfo;
         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);
         }
 }




More information about the mesa-commit mailing list