From patchwork Thu Sep 20 21:36:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1487981 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 9CCFA3FE65 for ; Thu, 20 Sep 2012 21:40:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B141A0E7E for ; Thu, 20 Sep 2012 14:40:09 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gh0-f177.google.com (mail-gh0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 98763A0E6B for ; Thu, 20 Sep 2012 14:37:27 -0700 (PDT) Received: by mail-gh0-f177.google.com with SMTP id f20so810395ghb.36 for ; Thu, 20 Sep 2012 14:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=pDYA0UB0WYVhjEfW4YoVLLP7bsXepLdL1D0EA81sBUE=; b=P4Dbvk8ZE52nxH2h8soV908fFwEG5XZ1vtwar47NRQZjZ58A3K7zxsgF++Kttw6VKq lgCHb1e3R1/4HWde/gaUOAMIX3rz70iIvbFMWMr3IySF6RAr33YdxfurGQbKkZRDnvdt cRUvrP/CUw4S5l2oxx0hVuSeZOtXlS2J9GtNtN4sQ7jcNAyjwAWRccA7UGsEr8JCrTLb cMs4o8IFWhAWJ7MqNjSVvlHm9HbOf7bV4WFlU609D0q/CFqiSJjro/2ntFa3p9Ktxwz7 xhas3VkW/2X9WK+uv8N+QQ43tjxswyQu1AD+kt4ySBcHVyILPjMN+fmTC+/RjtSNbAH4 7c7w== Received: by 10.236.177.70 with SMTP id c46mr3429758yhm.33.1348177047391; Thu, 20 Sep 2012 14:37:27 -0700 (PDT) Received: from vicky.domain.invalid ([187.112.178.243]) by mx.google.com with ESMTPS id s12sm7325805anh.2.2012.09.20.14.37.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 14:37:26 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 20 Sep 2012 18:36:06 -0300 Message-Id: <1348176967-4323-5-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1348176967-4323-1-git-send-email-przanoni@gmail.com> References: <1348176967-4323-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 4/5] drm/i915: remove unused variables from ironlake_crtc_mode_set X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni 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 Reviewed-by: Rodrigo Vivi --- 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; }