On Fri, Aug 12, 2016 at 02:20:12PM +0300, David Weinehall wrote: > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index d8cc52c7ddf8..3efc5af97231 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -2046,6 +2046,12 @@ static inline struct drm_i915_private *to_i915(const struct drm_device *dev) > return container_of(dev, struct drm_i915_private, drm); > } > > +static inline struct drm_i915_private *cast_to_i915(void *data) > +{ > + struct drm_device *dev = data; > + return to_i915(dev); > +} I wouldn't put this in i915_drv.h as this is very specific to the callsite, as it must know it has a void pointer to struct drm_device. Especially as to_i915() just works, right? -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx