On Wed, 02 Jan 2019, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx> wrote: > On 31/12/2018 14:56, Jani Nikula wrote: >> Encourage use of INTEL_INFO() to access dev_priv->info to not accumulate >> more direct users of ->info, making further changes easier. >> >> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx> >> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> >> --- >> drivers/gpu/drm/i915/i915_drv.h | 10 ++-------- >> 1 file changed, 2 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h >> index ce8d7a97e26b..18e67aaef764 100644 >> --- a/drivers/gpu/drm/i915/i915_drv.h >> +++ b/drivers/gpu/drm/i915/i915_drv.h >> @@ -1431,7 +1431,7 @@ struct drm_i915_private { >> struct kmem_cache *dependencies; >> struct kmem_cache *priorities; >> >> - const struct intel_device_info info; >> + const struct intel_device_info __info; /* Use INTEL_INFO() to access. */ >> struct intel_runtime_info __runtime; /* Use RUNTIME_INFO() to access. */ >> struct intel_driver_caps caps; >> >> @@ -2192,13 +2192,7 @@ static inline unsigned int i915_sg_segment_size(void) >> return size; >> } >> >> -static inline const struct intel_device_info * >> -intel_info(const struct drm_i915_private *dev_priv) >> -{ >> - return &dev_priv->info; >> -} >> - > > What was this helper for, who remembers? :) Didn't dig through the git logs, but I presume it's a leftover from the days we were migrating to subclassing drm_device in drm_i915_private... BR, Jani. > > Regards, > > Tvrtko > >> -#define INTEL_INFO(dev_priv) intel_info((dev_priv)) >> +#define INTEL_INFO(dev_priv) (&(dev_priv)->__info) >> #define RUNTIME_INFO(dev_priv) (&(dev_priv)->__runtime) >> #define DRIVER_CAPS(dev_priv) (&(dev_priv)->caps) >> >> > -- Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx