From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918AbdEIPgQ (ORCPT ); Tue, 9 May 2017 11:36:16 -0400 Received: from gateway32.websitewelcome.com ([192.185.145.125]:14089 "EHLO gateway32.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512AbdEIPgP (ORCPT ); Tue, 9 May 2017 11:36:15 -0400 Date: Tue, 9 May 2017 10:36:11 -0500 From: "Gustavo A. R. Silva" To: Patrik Jakobsson , David Airlie Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] gpu: drm: gma500: remove dead code Message-ID: <20170509153611.GA8109@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 - vger.kernel.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.152.157.2 X-Exim-ID: 1d87BL-000JB3-M1 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.157.2]:47496 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 8 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Local variable pipe is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 201351 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c index 8b2eb32..58a9751 100644 --- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c +++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c @@ -265,17 +265,16 @@ int oaktrail_crtc_hdmi_mode_set(struct drm_crtc *crtc, struct drm_device *dev = crtc->dev; struct drm_psb_private *dev_priv = dev->dev_private; struct oaktrail_hdmi_dev *hdmi_dev = dev_priv->hdmi_priv; - int pipe = 1; - int htot_reg = (pipe == 0) ? HTOTAL_A : HTOTAL_B; - int hblank_reg = (pipe == 0) ? HBLANK_A : HBLANK_B; - int hsync_reg = (pipe == 0) ? HSYNC_A : HSYNC_B; - int vtot_reg = (pipe == 0) ? VTOTAL_A : VTOTAL_B; - int vblank_reg = (pipe == 0) ? VBLANK_A : VBLANK_B; - int vsync_reg = (pipe == 0) ? VSYNC_A : VSYNC_B; - int dspsize_reg = (pipe == 0) ? DSPASIZE : DSPBSIZE; - int dsppos_reg = (pipe == 0) ? DSPAPOS : DSPBPOS; - int pipesrc_reg = (pipe == 0) ? PIPEASRC : PIPEBSRC; - int pipeconf_reg = (pipe == 0) ? PIPEACONF : PIPEBCONF; + int htot_reg = HTOTAL_B; + int hblank_reg = HBLANK_B; + int hsync_reg = HSYNC_B; + int vtot_reg = VTOTAL_B; + int vblank_reg = VBLANK_B; + int vsync_reg = VSYNC_B; + int dspsize_reg = DSPBSIZE; + int dsppos_reg = DSPBPOS; + int pipesrc_reg = PIPEBSRC; + int pipeconf_reg = PIPEBCONF; int refclk; struct oaktrail_hdmi_clock clock; u32 dspcntr, pipeconf, dpll, temp; -- 2.5.0