Re: [PATCH 2/5] drm/i915: Refactor power well refcount inc/dec operations

Chris Wilson
2013-09-13T20:16:46Z

On Fri, Sep 13, 2013 at 05:09:09PM -0300, Paulo Zanoni wrote:
> 2013/9/12 <ville.syrjala@linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > We increase/decrease the power well refcount in several places now, and
> > all of those places need to do the same thing, so pull that code into
> > a few small helper functions.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> <bikeshed> I don't think we need those "__" in the beginning. </bikeshed>

It would work better as __intel_power_well_get/put. Then it follows the
convention that you have a wrapper that does some sanity checks, takes
a locks and calls the core locked (unsafe) function, before unwrapping.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre