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: 9728247 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 34FD8602B4 for ; Tue, 16 May 2017 00:52:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B15128450 for ; Tue, 16 May 2017 00:52:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D19D2845D; Tue, 16 May 2017 00:52:51 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham 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 9595B28450 for ; Tue, 16 May 2017 00:52:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A90586E2AA; Tue, 16 May 2017 00:51:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1365 seconds by postgrey-1.35 at gabe; Mon, 15 May 2017 22:18:54 UTC Received: from gateway21.websitewelcome.com (gateway21.websitewelcome.com [192.185.45.140]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3804B6E287 for ; Mon, 15 May 2017 22:18:54 +0000 (UTC) Received: from cm3.websitewelcome.com (unknown [108.167.139.23]) by gateway21.websitewelcome.com (Postfix) with ESMTP id D2562400E33CB for ; Mon, 15 May 2017 16:56:08 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cm3.websitewelcome.com with id Llw61v00N0V9LXg01lw7Bw; 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 Subject: [PATCH 1/2] gpu: drm: i915: remove dead code 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: 5 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Mailman-Approved-At: Tue, 16 May 2017 00:51:18 +0000 Cc: intel-gfx@lists.freedesktop.org, "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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; }