From: Damien Lespiau Subject: [PATCH 06/12] drm/i915: Constify the drm_i915_private pointer a bit more Date: Mon, 6 Jan 2014 19:17:23 +0000 Message-ID: <1389035849-20563-7-git-send-email-damien.lespiau@intel.com> References: <1389035849-20563-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 90F7D1066F2 for ; Mon, 6 Jan 2014 11:18:05 -0800 (PST) In-Reply-To: <1389035849-20563-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org A lot of the WM functions are only reading from that structure and are already using const. While converting the code to use dev_priv instead of dev, I noticed a few places where we can give that hint. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 95eb4cc..f018d24 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -1902,7 +1902,7 @@ static unsigned int ilk_cursor_wm_max(const struct drm_i915_private *dev_priv, } /* Calculate the maximum FBC watermark */ -static unsigned int ilk_fbc_wm_max(struct drm_i915_private *dev_priv) +static unsigned int ilk_fbc_wm_max(const struct drm_i915_private *dev_priv) { /* max that registers can hold */ if (dev_priv->info->gen >= 8) @@ -1911,7 +1911,7 @@ static unsigned int ilk_fbc_wm_max(struct drm_i915_private *dev_priv) return 15; } -static void ilk_compute_wm_maximums(struct drm_i915_private *dev_priv, +static void ilk_compute_wm_maximums(const struct drm_i915_private *dev_priv, int level, const struct intel_wm_config *config, enum intel_ddb_partitioning ddb_partitioning, @@ -1964,7 +1964,7 @@ static bool ilk_validate_wm_level(int level, return ret; } -static void ilk_compute_wm_level(struct drm_i915_private *dev_priv, +static void ilk_compute_wm_level(const struct drm_i915_private *dev_priv, int level, const struct ilk_pipe_wm_parameters *p, struct intel_wm_level *result) @@ -2161,7 +2161,7 @@ static bool intel_compute_pipe_wm(struct drm_crtc *crtc, struct intel_pipe_wm *pipe_wm) { struct drm_device *dev = crtc->dev; - struct drm_i915_private *dev_priv = dev->dev_private; + const struct drm_i915_private *dev_priv = dev->dev_private; int level, max_level = ilk_wm_max_level(dev); /* LP0 watermark maximums depend on this pipe alone */ struct intel_wm_config config = { -- 1.8.3.1