Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 4/5] drm/i915: remove unused variables from ironlake_crtc_mode_set
Date: Thu, 20 Sep 2012 18:36:06 -0300	[thread overview]
Message-ID: <1348176967-4323-5-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1348176967-4323-1-git-send-email-przanoni@gmail.com>

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

The last patches moved a lot of code from ironlake_crtc_mode_set to
sub-functions, so these variables became useless. You could get
warnings by enabling -Wunused-but-set-variable.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |   21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 5fb082f..c402774 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4898,39 +4898,24 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
 	int num_connectors = 0;
 	intel_clock_t clock, reduced_clock;
 	u32 dpll, fp = 0, fp2 = 0;
-	bool ok, has_reduced_clock = false, is_sdvo = false;
-	bool is_crt = false, is_lvds = false, is_tv = false, is_dp = false;
+	bool ok, has_reduced_clock = false;
+	bool is_lvds = false, is_dp = false, is_cpu_edp = false;
 	struct intel_encoder *encoder;
 	u32 temp;
 	int ret;
 	bool dither;
-	bool is_cpu_edp = false, is_pch_edp = false;
 
 	for_each_encoder_on_crtc(dev, crtc, encoder) {
 		switch (encoder->type) {
 		case INTEL_OUTPUT_LVDS:
 			is_lvds = true;
 			break;
-		case INTEL_OUTPUT_SDVO:
-		case INTEL_OUTPUT_HDMI:
-			is_sdvo = true;
-			if (encoder->needs_tv_clock)
-				is_tv = true;
-			break;
-		case INTEL_OUTPUT_TVOUT:
-			is_tv = true;
-			break;
-		case INTEL_OUTPUT_ANALOG:
-			is_crt = true;
-			break;
 		case INTEL_OUTPUT_DISPLAYPORT:
 			is_dp = true;
 			break;
 		case INTEL_OUTPUT_EDP:
 			is_dp = true;
-			if (intel_encoder_is_pch_edp(&encoder->base))
-				is_pch_edp = true;
-			else
+			if (!intel_encoder_is_pch_edp(&encoder->base))
 				is_cpu_edp = true;
 			break;
 		}
-- 
1.7.10.4

  parent reply	other threads:[~2012-09-20 21:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20 21:36 [PATCH 0/5] Rework ironlake_crtc_mode_set V2 Paulo Zanoni
2012-09-20 21:36 ` [PATCH 1/5] drm/i915: don't recheck for invalid pipe bpp Paulo Zanoni
2012-09-24 22:47   ` Rodrigo Vivi
2012-09-20 21:36 ` [PATCH 2/5] drm/i915: extract set_m_n from ironlake_crtc_mode_set Paulo Zanoni
2012-09-24 23:00   ` Rodrigo Vivi
2012-09-20 21:36 ` [PATCH 3/5] drm/i915: extract compute_dpll " Paulo Zanoni
2012-09-24 23:08   ` Rodrigo Vivi
2012-09-20 21:36 ` Paulo Zanoni [this message]
2012-09-24 23:36   ` [PATCH 4/5] drm/i915: remove unused variables " Rodrigo Vivi
2012-09-25  8:44     ` Daniel Vetter
2012-09-20 21:36 ` [PATCH 5/5] drm/i915: extract intel_set_pipe_timings from crtc_mode_set Paulo Zanoni
2012-09-24 23:53   ` Rodrigo Vivi
2012-10-01 21:10   ` [PATCH] " Paulo Zanoni
2012-10-02 13:40     ` Rodrigo Vivi

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=1348176967-4323-5-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox