Skip to content

Commit d856786

Browse files
committed
drm/i915/breadcrumbs: s/container_of/rb_entry/
In keeping with commit f802cf7 ("drm/i915/debugfs: use rb_entry()"), convert the primary user of the rbtrees over to using rb_entry rather than the equivalent container_of. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/20161220104003.8044-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent f802cf7 commit d856786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/i915/intel_breadcrumbs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static void __intel_breadcrumbs_disable_irq(struct intel_breadcrumbs *b)
154154

155155
static inline struct intel_wait *to_wait(struct rb_node *node)
156156
{
157-
return container_of(node, struct intel_wait, node);
157+
return rb_entry(node, struct intel_wait, node);
158158
}
159159

160160
static inline void __intel_breadcrumbs_finish(struct intel_breadcrumbs *b,
@@ -427,7 +427,7 @@ static bool signal_complete(struct drm_i915_gem_request *request)
427427

428428
static struct drm_i915_gem_request *to_signaler(struct rb_node *rb)
429429
{
430-
return container_of(rb, struct drm_i915_gem_request, signaling.node);
430+
return rb_entry(rb, struct drm_i915_gem_request, signaling.node);
431431
}
432432

433433
static void signaler_set_rtpriority(void)

0 commit comments

Comments
 (0)