From patchwork Sun Jul 6 18:59:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4491491 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 17910BEEAA for ; Sun, 6 Jul 2014 18:58:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 557B220253 for ; Sun, 6 Jul 2014 18:58:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F2672024C for ; Sun, 6 Jul 2014 18:58:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752225AbaGFS6D (ORCPT ); Sun, 6 Jul 2014 14:58:03 -0400 Received: from mail-we0-f181.google.com ([74.125.82.181]:44440 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752193AbaGFS6B (ORCPT ); Sun, 6 Jul 2014 14:58:01 -0400 Received: by mail-we0-f181.google.com with SMTP id q59so3421504wes.26 for ; Sun, 06 Jul 2014 11:58:00 -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=H2iUjzAvhn95KgYXE0LEkkqyqRZsyquhC9J3L9VDDno=; b=msO50zY+d2n1205Mk952RLcGFj0wWOI7JF4aSCqQRvefMoDU79F5SB4o/wPyUQ5hny uvDh/LXejjHM6a8i4CbxrgAq67YZZQ/DsJ2tc/uWWGRG5nXS4jECtSqA8Amnq/GvEY1k zp2DcaRtD/+FJkxPJCnGbzrmWrzQdXIQbs1NP4zoDGAUQgrjYhvEpzfhnGgwFfoZILWX 3OINjgHTd0G4MC2zJZOX9/jXmm4u1UDUJVfH2fAR85DtOREQoARBFuz3AztrjHnyK7wJ 7Q/yBJm8uFT1DsLCU3Oo0lxodOpF+g4TIN+yClveXNwd6swq/R/hjxDh4s2b8ilwCpa7 07TA== X-Gm-Message-State: ALoCoQmetE1ubgYnNuF800GqhvVf7eC9hrVg5ivX0CpCtMobKXxySj9aDJ0OzDPt8yZJBQ4FAhgH X-Received: by 10.180.82.199 with SMTP id k7mr32394374wiy.34.1404673080329; Sun, 06 Jul 2014 11:58:00 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id rw4sm84167839wjb.44.2014.07.06.11.57.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:57:59 -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: sis: init301.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:59:16 +0200 Message-Id: <1404673156-20413-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=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 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/sis/init301.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c index a89e3ca..066fd27 100644 --- a/drivers/video/fbdev/sis/init301.c +++ b/drivers/video/fbdev/sis/init301.c @@ -926,7 +926,7 @@ SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo) temp &= 0xFEFF; if(!(myvbinfo & SetCRT2ToTV)) temp |= 0x0100; SiS_SetRegShort((acpibase + 0x3a), temp); - temp = SiS_GetRegShort((acpibase + 0x3a)); + SiS_GetRegShort((acpibase + 0x3a)); } #endif @@ -2151,17 +2151,15 @@ SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned shor unsigned short RefreshRateTableIndex) { unsigned short CRT2Index, VCLKIndex = 0, VCLKIndexGEN = 0, VCLKIndexGENCRT = 0; - unsigned short modeflag, resinfo, tempbx; + unsigned short resinfo, tempbx; const unsigned char *CHTVVCLKPtr = NULL; if(ModeNo <= 0x13) { - modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo; CRT2Index = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC; VCLKIndexGEN = (SiS_GetRegByte((SiS_Pr->SiS_P3ca+0x02)) >> 2) & 0x03; VCLKIndexGENCRT = VCLKIndexGEN; } else { - modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO; CRT2Index = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC; VCLKIndexGEN = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;