From patchwork Mon May 15 21:56:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 9728527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 900FB60386 for ; Tue, 16 May 2017 08:19:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F7A4285F9 for ; Tue, 16 May 2017 08:19:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7427D289A7; Tue, 16 May 2017 08:19:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 42DFD285F9 for ; Tue, 16 May 2017 08:19:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D55FD6E2CC; Tue, 16 May 2017 08:19:27 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 1500 seconds by postgrey-1.35 at gabe; Mon, 15 May 2017 22:45:51 UTC Received: from gateway23.websitewelcome.com (gateway23.websitewelcome.com [192.185.48.104]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC1A389E26 for ; Mon, 15 May 2017 22:45:51 +0000 (UTC) Received: from cm2.websitewelcome.com (cm2.websitewelcome.com [192.185.178.13]) by gateway23.websitewelcome.com (Postfix) with ESMTP id A1D0111314 for ; Mon, 15 May 2017 16:56:08 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cm2.websitewelcome.com with id Llw61v00J0V9LXg01lw7LF; Mon, 15 May 2017 16:56:08 -0500 Received: from [189.219.177.89] (port=52594 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1dANyI-000XgL-J2; Mon, 15 May 2017 16:56:06 -0500 Date: Mon, 15 May 2017 16:56:05 -0500 From: "Gustavo A. R. Silva" To: Daniel Vetter , Jani Nikula , David Airlie Message-ID: <20170515215605.GA14963@embeddedgus> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - lists.freedesktop.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.219.177.89 X-Exim-ID: 1dANyI-000XgL-J2 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.219.177.89]:52594 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 4 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Mailman-Approved-At: Tue, 16 May 2017 08:19:26 +0000 Cc: intel-gfx@lists.freedesktop.org, "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 1/2] gpu: drm: i915: remove dead code X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Local variable has_reduced_clock is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 1362230 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/intel_display.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ed1f4f2..b13b53b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9565,8 +9565,6 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc, { struct drm_device *dev = crtc->base.dev; struct drm_i915_private *dev_priv = to_i915(dev); - struct dpll reduced_clock; - bool has_reduced_clock = false; struct intel_shared_dpll *pll; const struct intel_limit *limit; int refclk = 120000; @@ -9609,8 +9607,7 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc, return -EINVAL; } - ironlake_compute_dpll(crtc, crtc_state, - has_reduced_clock ? &reduced_clock : NULL); + ironlake_compute_dpll(crtc, crtc_state, NULL); pll = intel_get_shared_dpll(crtc, crtc_state, NULL); if (pll == NULL) { @@ -9619,10 +9616,6 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc, return -EINVAL; } - if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS) && - has_reduced_clock) - crtc->lowfreq_avail = true; - return 0; }