[Intel-gfx] [PATCH 03/11] drm/i915: Rename vma->*_list to *_link for consistency

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 17 03:45:56 PST 2015


On Thu, Dec 17, 2015 at 11:24:34AM +0000, Chris Wilson wrote:
> On Thu, Dec 17, 2015 at 11:14:54AM +0000, Tvrtko Ursulin wrote:
> > 
> > On 14/12/15 11:36, Chris Wilson wrote:
> > >Elsewhere we have adopted the convention of using '_link' to denote
> > >elements in the list (and '_list' for the actual list_head itself), and
> > >that the name should indicate which list the link belongs to (and
> > >preferrably not just where the link is being stored).
> > >
> > >s/vma_link/obj_link/ (we iterate over obj->vma_list)
> > >s/mm_list/vm_link/ (we iterate over vm->[in]active_list)
> > 
> > A little bit of pain for the established muscle memory but I think
> > good in general. Assuming you compile tested it:
> > 
> > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> > 
> > Btw perhaps rename the link in  i915_gem_active to request_link so
> > that the good initiative is not questioned. :)
> 
> I think I have:
> 
> 	drm_i915_gem_request.active_list
> 	i915_gem_active.link

Oh you meant the reverse object in the name,
i915_gem_active.request_link.

If we ever have multiple links it would be clearer. At the moment, I'm
erring on the side of laziness.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list