From patchwork Sat Jul 5 12:38: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: 4488041 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 835ED9F358 for ; Sat, 5 Jul 2014 12:37:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAF642039D for ; Sat, 5 Jul 2014 12:37:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA10620357 for ; Sat, 5 Jul 2014 12:37:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753475AbaGEMh0 (ORCPT ); Sat, 5 Jul 2014 08:37:26 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:33026 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464AbaGEMhZ (ORCPT ); Sat, 5 Jul 2014 08:37:25 -0400 Received: by mail-wi0-f170.google.com with SMTP id cc10so13049667wib.5 for ; Sat, 05 Jul 2014 05:37:24 -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=F4YiYtLqmCdXxYg1s8xDRd5gOGJA/ynL1ou9w7gDdHQ=; b=g1CvoRDwJUjjidvnZpTe+tvBUJkddA5p8sJUps2xFKzO0uKqNF7mPBp54Xkhd7O3/E Qf/JlpmgNVgB2I9bCOZW3OSzb6/1EdGua6kWTMr24vbPdG93vMdSUSUE608OmXhB1AYs yxnMcPS3c/5KksXllNUzupMpFw5N2DMA4hg/zd7rUBDi2/Ou/X3swCV1Pzr8mxr+Ub1a NuNJ8hlQuBk24lI6VnhMM7/cz16fLkeX1iFEDFv8j+KgNluJnvcHDJQWKAN6V1lCkN51 EcE2o4FXVeTfvscbATk0knwTovDZ0o08pxS7cGTEXUZCFy+iARCROHvq9UwcSyz2IV7t KKkA== X-Gm-Message-State: ALoCoQlkwLnUY3/hAa1e4xiiCBFt1GxrSVMy/W9UO/EBqJctIP08gpvhUjPdTlC8OLDOUtgQC/LG X-Received: by 10.180.75.75 with SMTP id a11mr62205457wiw.3.1404563844301; Sat, 05 Jul 2014 05:37:24 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id au7sm18738726wjc.41.2014.07.05.05.37.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:37:23 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Grant Likely , Rob Herring , Archit Taneja , Tony Lindgren , Jingoo Han , Sathya Prakash M R , Joe Perches , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH] video: fbdev: omap2: dss: dsi.c: Cleaning up variable that is never used Date: Sat, 5 Jul 2014 14:38:40 +0200 Message-Id: <1404563921-20941-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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Rickard Strandqvist 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/omap2/dss/dsi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c index 4755a34..32d2ba6 100644 --- a/drivers/video/fbdev/omap2/dss/dsi.c +++ b/drivers/video/fbdev/omap2/dss/dsi.c @@ -1207,13 +1207,12 @@ static inline void dsi_enable_pll_clock(struct platform_device *dsidev, static void _dsi_print_reset_status(struct platform_device *dsidev) { - u32 l; int b0, b1, b2; /* A dummy read using the SCP interface to any DSIPHY register is * required after DSIPHY reset to complete the reset of the DSI complex * I/O. */ - l = dsi_read_reg(dsidev, DSI_DSIPHY_CFG5); + dsi_read_reg(dsidev, DSI_DSIPHY_CFG5); if (dss_has_feature(FEAT_DSI_REVERSE_TXCLKESC)) { b0 = 28; @@ -3902,7 +3901,7 @@ static int dsi_proto_config(struct platform_device *dsidev) static void dsi_proto_timings(struct platform_device *dsidev) { struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); - unsigned tlpx, tclk_zero, tclk_prepare, tclk_trail; + unsigned tlpx, tclk_zero, tclk_prepare; unsigned tclk_pre, tclk_post; unsigned ths_prepare, ths_prepare_ths_zero, ths_zero; unsigned ths_trail, ths_exit; @@ -3921,7 +3920,7 @@ static void dsi_proto_timings(struct platform_device *dsidev) r = dsi_read_reg(dsidev, DSI_DSIPHY_CFG1); tlpx = FLD_GET(r, 20, 16) * 2; - tclk_trail = FLD_GET(r, 15, 8); + FLD_GET(r, 15, 8); tclk_zero = FLD_GET(r, 7, 0); r = dsi_read_reg(dsidev, DSI_DSIPHY_CFG2); @@ -4669,12 +4668,11 @@ static void print_dsi_dispc_vm(const char *str, unsigned long byteclk = t->hsclk / 4; unsigned long pck; u64 dsi_tput; - int dsi_hact, dsi_htot; + int dsi_hact; dsi_tput = (u64)byteclk * t->ndl * 8; pck = (u32)div64_u64(dsi_tput, t->bitspp); dsi_hact = DIV_ROUND_UP(DIV_ROUND_UP(t->hact * t->bitspp, 8) + 6, t->ndl); - dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfp; vm.pixelclock = pck; vm.hsw = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk);