public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Make intel_disable_shared_dpll() static
@ 2014-08-09 22:00 Damien Lespiau
  2014-08-09 22:00 ` [PATCH 2/3] drm/i915: Remove an unreachable 'return' Damien Lespiau
  2014-08-09 22:00 ` [PATCH 3/3] drm/i915: Remove set but unused 'gt_perf_status' Damien Lespiau
  0 siblings, 2 replies; 4+ messages in thread
From: Damien Lespiau @ 2014-08-09 22:00 UTC (permalink / raw)
  To: intel-gfx

Found with sparse.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a460bd3..4b89447 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1764,7 +1764,7 @@ static void intel_enable_shared_dpll(struct intel_crtc *crtc)
 	pll->on = true;
 }
 
-void intel_disable_shared_dpll(struct intel_crtc *crtc)
+static void intel_disable_shared_dpll(struct intel_crtc *crtc)
 {
 	struct drm_device *dev = crtc->base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] drm/i915: Remove an unreachable 'return'
  2014-08-09 22:00 [PATCH 1/3] drm/i915: Make intel_disable_shared_dpll() static Damien Lespiau
@ 2014-08-09 22:00 ` Damien Lespiau
  2014-08-11  9:47   ` Ville Syrjälä
  2014-08-09 22:00 ` [PATCH 3/3] drm/i915: Remove set but unused 'gt_perf_status' Damien Lespiau
  1 sibling, 1 reply; 4+ messages in thread
From: Damien Lespiau @ 2014-08-09 22:00 UTC (permalink / raw)
  To: intel-gfx

Running smatch adds quite a few checks to what sparse is doing. This is
one of them.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4b89447..a6af1b2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8646,7 +8646,6 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
 		}
 
 		goto unlock;
-		return;
 	}
 
 	/* Switch crtc and encoder back off if necessary */
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] drm/i915: Remove set but unused 'gt_perf_status'
  2014-08-09 22:00 [PATCH 1/3] drm/i915: Make intel_disable_shared_dpll() static Damien Lespiau
  2014-08-09 22:00 ` [PATCH 2/3] drm/i915: Remove an unreachable 'return' Damien Lespiau
@ 2014-08-09 22:00 ` Damien Lespiau
  1 sibling, 0 replies; 4+ messages in thread
From: Damien Lespiau @ 2014-08-09 22:00 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 41de760..12f4e14 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3719,7 +3719,6 @@ static void gen6_enable_rps(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_engine_cs *ring;
 	u32 rp_state_cap;
-	u32 gt_perf_status;
 	u32 rc6vids, pcu_mbox = 0, rc6_mask = 0;
 	u32 gtfifodbg;
 	int rc6_mode;
@@ -3744,7 +3743,6 @@ static void gen6_enable_rps(struct drm_device *dev)
 	gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL);
 
 	rp_state_cap = I915_READ(GEN6_RP_STATE_CAP);
-	gt_perf_status = I915_READ(GEN6_GT_PERF_STATUS);
 
 	parse_rp_state_cap(dev_priv, rp_state_cap);
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3] drm/i915: Remove an unreachable 'return'
  2014-08-09 22:00 ` [PATCH 2/3] drm/i915: Remove an unreachable 'return' Damien Lespiau
@ 2014-08-11  9:47   ` Ville Syrjälä
  0 siblings, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2014-08-11  9:47 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: intel-gfx

On Sat, Aug 09, 2014 at 11:00:57PM +0100, Damien Lespiau wrote:
> Running smatch adds quite a few checks to what sparse is doing. This is
> one of them.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4b89447..a6af1b2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8646,7 +8646,6 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
>  		}
>  
>  		goto unlock;
> -		return;

I have a locking fix that removes the goto and keeps the return :)
I'll send it out now.

>  	}
>  
>  	/* Switch crtc and encoder back off if necessary */
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-11  9:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-09 22:00 [PATCH 1/3] drm/i915: Make intel_disable_shared_dpll() static Damien Lespiau
2014-08-09 22:00 ` [PATCH 2/3] drm/i915: Remove an unreachable 'return' Damien Lespiau
2014-08-11  9:47   ` Ville Syrjälä
2014-08-09 22:00 ` [PATCH 3/3] drm/i915: Remove set but unused 'gt_perf_status' Damien Lespiau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox