Re: [PATCH 02/12] drm/i915: Use the new rq->i915 field where appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 24, 2015 at 02:23:03PM +0000, Chris Wilson wrote:
> On Tue, Nov 24, 2015 at 02:57:04PM +0100, Daniel Vetter wrote:
> > On Fri, Nov 20, 2015 at 12:43:42PM +0000, Chris Wilson wrote:
> > > In a few frequent cases, having a direct pointer to the drm_i915_private
> > > from the request is very useful.
> > > 
> > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > 
> > req->i915 is a bit inconsistent imo, i915_dev would be better. Anyway, not
> > something you started, just makes the code a bit harder to speed-read ;-)
> 
> How does it strike you as inconsistent? rq->i915 was nicer :-p
> 
> The idea I have been trying to sell is i915->drm->dev for the struct
> drm_i915_private / struct drm_device / struct device triplet.

Hm, we should do an overview section in i915 docs about best practices in
variable naming. I'm serious about this, since we have similar fun with
modeset stuff:

- Preferred: crtc for struct intel_crtc, drm_crtc for struct drm_crtc.
- Transitinoal: crtc for struct drm_crtc, intel_crtc for struct
  intel_crtc. But if you have only one, then don't use that.

Maybe we should mention intel_ vs. i915_ vs. platform prefixes too?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux