[Intel-gfx] [PATCH] drm/i915: Use dev_priv as first argument of for_each_pipe()

Damien Lespiau damien.lespiau at intel.com
Mon Aug 18 15:07:40 CEST 2014


On Mon, Aug 18, 2014 at 01:58:06PM +0100, Chris Wilson wrote:
> On Mon, Aug 18, 2014 at 01:49:10PM +0100, Damien Lespiau wrote:
> > Chris has decided that enough is enough. It's time to fixup dev Vs
> > dev_priv. This is a modest contribution to the crusade.
> > 
> > v2: Still use INTEL_INFO(), for the (mythical!) case we want to hardcode
> >     the info struct with defines (Chris)
> >     Rename the macro argument from 'dev' to 'dev_priv' (Jani)
> > 
> > v3: Use names unlikely to be used as macro arguments (Chris)
> 
> I can be annoying! These macros typically take the iter as the first
> argument...

How typical is your typical?

#define for_each_pipe(__dev_priv, __p)
#define for_each_crtc(dev, crtc)
#define for_each_intel_crtc(dev, intel_crtc)
#define for_each_intel_encoder(dev, intel_encoder) 
#define for_each_encoder_on_crtc(dev, __crtc, intel_encoder)
#define for_each_connector_on_encoder(dev, __encoder, intel_connector)

Sounds like a lot of churn for no good reason this time.

-- 
Damien



More information about the Intel-gfx mailing list