Skip to content

Commit

Permalink
drm/i915/error: use rb_entry()
Browse files Browse the repository at this point in the history
To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/b08fd4be9d4c45d88c158a17b854c3fd628840ed.1484816339.git.geliangtang@gmail.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Geliang Tang authored and Chris Wilson committed Jan 23, 2017
1 parent ec78828 commit e27414a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gpu_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ static void error_record_engine_waiters(struct intel_engine_cs *engine,

ee->waiters = waiter;
for (rb = rb_first(&b->waiters); rb; rb = rb_next(rb)) {
struct intel_wait *w = container_of(rb, typeof(*w), node);
struct intel_wait *w = rb_entry(rb, typeof(*w), node);

strcpy(waiter->comm, w->tsk->comm);
waiter->pid = w->tsk->pid;
Expand Down

0 comments on commit e27414a

Please sign in to comment.