[Intel-gfx] [PATCH] drm/i915/breadcrumbs: s/container_of/rb_entry/
Daniel Vetter
daniel at ffwll.ch
Tue Dec 20 10:49:33 UTC 2016
On Tue, Dec 20, 2016 at 10:40:03AM +0000, Chris Wilson wrote:
> In keeping with commit f802cf7e0986 ("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 at chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_breadcrumbs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index 53ae7884babd..fcfa423d08bd 100644
> --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> @@ -154,7 +154,7 @@ static void __intel_breadcrumbs_disable_irq(struct intel_breadcrumbs *b)
>
> static inline struct intel_wait *to_wait(struct rb_node *node)
> {
> - return container_of(node, struct intel_wait, node);
> + return rb_entry(node, struct intel_wait, node);
> }
>
> static inline void __intel_breadcrumbs_finish(struct intel_breadcrumbs *b,
> @@ -427,7 +427,7 @@ static bool signal_complete(struct drm_i915_gem_request *request)
>
> static struct drm_i915_gem_request *to_signaler(struct rb_node *rb)
> {
> - return container_of(rb, struct drm_i915_gem_request, signaling.node);
> + return rb_entry(rb, struct drm_i915_gem_request, signaling.node);
> }
>
> static void signaler_set_rtpriority(void)
> --
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list