All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 06/19] drm/i915: Make IS_GEN-range macro only take dev_priv
Date: Tue, 11 Oct 2016 14:21:39 +0100	[thread overview]
Message-ID: <1476192112-25336-7-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1476192112-25336-1-git-send-email-tvrtko.ursulin@linux.intel.com>

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>
---
 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

  parent reply	other threads:[~2016-10-11 13:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 13:21 [PATCH v2 00/19] .rodata.str diet Tvrtko Ursulin
2016-10-11 13:21 ` [PATCH 01/19] drm/i915: Make HAS_DDI and HAS_PCH_LPT_LP only take dev_priv Tvrtko Ursulin
2016-10-12 10:40   ` David Weinehall
2016-10-11 13:21 ` [PATCH 02/19] drm/i915: Make INTEL_PCH_TYPE & co " Tvrtko Ursulin
2016-10-12  9:33   ` David Weinehall
2016-10-11 13:21 ` [PATCH 03/19] drm/i915: Make HAS_GMCH_DISPLAY " Tvrtko Ursulin
2016-10-12  8:17   ` David Weinehall
2016-10-12  8:43     ` Tvrtko Ursulin
2016-10-12 10:04       ` David Weinehall
2016-10-11 13:21 ` [PATCH 04/19] drm/i915: Make HAS_RUNTIME_PM " Tvrtko Ursulin
2016-10-12  8:11   ` David Weinehall
2016-10-11 13:21 ` [PATCH 05/19] drm/i915: Do not use INTEL_INFO(dev_priv)->ring_mask inside WARNs Tvrtko Ursulin
2016-10-11 13:21 ` Tvrtko Ursulin [this message]
2016-10-12 12:03   ` [PATCH 06/19] drm/i915: Make IS_GEN-range macro only take dev_priv David Weinehall
2016-10-11 13:21 ` [PATCH 07/19] drm/i915: Make INTEL_DEVID " Tvrtko Ursulin
2016-10-12 10:43   ` David Weinehall
2016-10-11 13:21 ` [PATCH 08/19] drm/i915: Make IS_IVYBRIDGE " Tvrtko Ursulin
2016-10-12 10:40   ` David Weinehall
2016-10-11 13:21 ` [PATCH 09/19] drm/i915: Make IS_BROADWELL " Tvrtko Ursulin
2016-10-12 12:07   ` David Weinehall
2016-10-11 13:21 ` [PATCH 10/19] drm/i915: Make IS_HASWELL " Tvrtko Ursulin
2016-10-12 10:52   ` David Weinehall
2016-10-11 13:21 ` [PATCH 11/19] drm/i915: Make IS_KABYLAKE " Tvrtko Ursulin
2016-10-12 11:42   ` David Weinehall
2016-10-11 13:21 ` [PATCH 12/19] drm/i915: Make IS_SKYLAKE " Tvrtko Ursulin
2016-10-12 10:46   ` David Weinehall
2016-10-11 13:21 ` [PATCH 13/19] drm/i915: Make IS_BROXTON " Tvrtko Ursulin
2016-10-12 11:52   ` David Weinehall
2016-10-12 12:06     ` Tvrtko Ursulin
2016-10-12 12:50       ` David Weinehall
2016-10-13  9:44         ` [PATCH v3 " Tvrtko Ursulin
2016-10-13  9:53           ` David Weinehall
2016-10-11 13:21 ` [PATCH 14/19] drm/i915: Make HAS_L3_DPF " Tvrtko Ursulin
2016-10-12 10:54   ` David Weinehall
2016-10-11 13:21 ` [PATCH 15/19] drm/i915: Make IS_G4X " Tvrtko Ursulin
2016-10-12 11:43   ` David Weinehall
2016-10-11 13:21 ` [PATCH 16/19] drm/i915: Make IS_CHERRYVIEW " Tvrtko Ursulin
2016-10-12 12:09   ` David Weinehall
2016-10-11 13:21 ` [PATCH 17/19] drm/i915: Make IS_VALLEYVIEW " Tvrtko Ursulin
2016-10-12 11:50   ` David Weinehall
2016-10-11 13:21 ` [PATCH 18/19] drm/i915: Make INTEL_GEN " Tvrtko Ursulin
2016-10-12 11:44   ` David Weinehall
2016-10-11 13:21 ` [PATCH 19/19] drm/i915: Make IS_GEN macros " Tvrtko Ursulin
2016-10-12 11:50   ` David Weinehall
2016-10-11 13:49 ` ✗ Fi.CI.BAT: warning for .rodata.str diet Patchwork
2016-10-13 10:50 ` ✓ Fi.CI.BAT: success for .rodata.str diet (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476192112-25336-7-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.