Message ID | 1476192112-25336-7-git-send-email-tvrtko.ursulin@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 11, 2016 at 02:21:39PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > Saves 944 bytes of .rodata strings. > > v2: Add parantheses around dev_priv. (Ville Syrjala) > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: David Weinehall <david.weinehall@linux.intel.com> > --- > drivers/gpu/drm/i915/i915_drv.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index aac9375cccb3..58045cd7a087 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -2616,7 +2616,7 @@ struct drm_i915_cmd_table { > * > * Use GEN_FOREVER for unbound start and or end. > */ > -#define IS_GEN(p, s, e) ({ \ > +#define IS_GEN(dev_priv, s, e) ({ \ > unsigned int __s = (s), __e = (e); \ > BUILD_BUG_ON(!__builtin_constant_p(s)); \ > BUILD_BUG_ON(!__builtin_constant_p(e)); \ > @@ -2626,7 +2626,7 @@ struct drm_i915_cmd_table { > __e = BITS_PER_LONG - 1; \ > else \ > __e = (e) - 1; \ > - !!(INTEL_INFO(p)->gen_mask & GENMASK((__e), (__s))); \ > + !!((dev_priv)->info.gen_mask & GENMASK((__e), (__s))); \ > }) > > /* > -- > 2.7.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index aac9375cccb3..58045cd7a087 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2616,7 +2616,7 @@ struct drm_i915_cmd_table { * * Use GEN_FOREVER for unbound start and or end. */ -#define IS_GEN(p, s, e) ({ \ +#define IS_GEN(dev_priv, s, e) ({ \ unsigned int __s = (s), __e = (e); \ BUILD_BUG_ON(!__builtin_constant_p(s)); \ BUILD_BUG_ON(!__builtin_constant_p(e)); \ @@ -2626,7 +2626,7 @@ struct drm_i915_cmd_table { __e = BITS_PER_LONG - 1; \ else \ __e = (e) - 1; \ - !!(INTEL_INFO(p)->gen_mask & GENMASK((__e), (__s))); \ + !!((dev_priv)->info.gen_mask & GENMASK((__e), (__s))); \ }) /*