From patchwork Sun Jul 6 18:48:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4491281 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 98DD19F26C for ; Sun, 6 Jul 2014 18:47:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA8C120253 for ; Sun, 6 Jul 2014 18:47:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15F882024C for ; Sun, 6 Jul 2014 18:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbaGFSrZ (ORCPT ); Sun, 6 Jul 2014 14:47:25 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:37589 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbaGFSrY (ORCPT ); Sun, 6 Jul 2014 14:47:24 -0400 Received: by mail-we0-f174.google.com with SMTP id u57so3462893wes.19 for ; Sun, 06 Jul 2014 11:47:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=22ebpy6JzmY2MSYe4UJLgDhVHMMJ1/LgLiGvLPLYQ0k=; b=axiq+1ooKr7kDeovcpIEd+48mok/bOKoylG+ZrfX15iQYJLNdoKxPkp5Ju7cWtHI/y x+t0Y4/E6LISRxtavZG7M3HBjSgxEtZaOnSYAt96S71EoIH2Gmyf650TO4sKAIQaKxZ6 XSP6zVgJV91515Zrwj3ZGhThv/H8H5lnHW3/qMg9g+KJgI9pvBaTluiXTfdQCZ175aD6 dkL5A2ijUzcJcoDVdGWGW/MsXQDJb8+VYeI92kbC9zW4Mvk97RRtfKfVudE2pZuTaTVB nC0wbQ6ZMf6GozXwt21039kCIDPf26rz1X/dIgU0YErWYtShiotsOIwOP76YKHuWwdma IdEQ== X-Gm-Message-State: ALoCoQlJjvGDHt35UnAvhbZj+OEgN0n4XPk/dF7kbpGPbk6Zf5a2H65EhPgh54Kcj4tEqn9kALeT X-Received: by 10.180.13.47 with SMTP id e15mr72706674wic.28.1404672443858; Sun, 06 Jul 2014 11:47:23 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id fb8sm105823236wib.15.2014.07.06.11.47.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:47:23 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: omap: hwa742.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:48:40 +0200 Message-Id: <1404672520-19569-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Variable ar assigned a value that is never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/omap/hwa742.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/omap/hwa742.c b/drivers/video/fbdev/omap/hwa742.c index a4ee65b..65b2370 100644 --- a/drivers/video/fbdev/omap/hwa742.c +++ b/drivers/video/fbdev/omap/hwa742.c @@ -787,7 +787,7 @@ static void calc_hwa742_clk_rates(unsigned long ext_clk, static int setup_tearsync(unsigned long pix_clk, int extif_div) { - int hdisp, vdisp; + int hdisp; int hndp, vndp; int hsw, vsw; int hs, vs; @@ -803,7 +803,7 @@ static int setup_tearsync(unsigned long pix_clk, int extif_div) vsw = vsw & 0x3f; hdisp = (hwa742_read_reg(HWA742_H_DISP_REG) & 0x7f) * 8; - vdisp = hwa742_read_reg(HWA742_V_DISP_1_REG) + + hwa742_read_reg(HWA742_V_DISP_1_REG) + ((hwa742_read_reg(HWA742_V_DISP_2_REG) & 0x3) << 8); hndp = hwa742_read_reg(HWA742_H_NDP_REG) & 0x7f;