From patchwork Sat Jul 5 12:49:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4488241 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 682EABEEAA for ; Sat, 5 Jul 2014 12:48:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A80420265 for ; Sat, 5 Jul 2014 12:48:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B87D32024F for ; Sat, 5 Jul 2014 12:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753463AbaGEMsK (ORCPT ); Sat, 5 Jul 2014 08:48:10 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:42354 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752659AbaGEMsK (ORCPT ); Sat, 5 Jul 2014 08:48:10 -0400 Received: by mail-wg0-f41.google.com with SMTP id a1so2544015wgh.0 for ; Sat, 05 Jul 2014 05:48:09 -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=n25jbUrAmNKw+m9bFYA6lZkb4vcMHxwJNFaomARpyRA=; b=jbFV95xOD+v1x5uoP2HR3HTPxkAMZxapXVJVD2jJt43dRSOPEdXdhwC1gWQtgVa7io NsFuVwTm9tlnNATwuQt89J58Nq1ceWRoLSYHI3OaXvq1H/fQd6+zdgynZvCS021SNDgL 8iaExRyPyxcjQ7xQoARoGnvlCYMK3jkFLkqphCiPxsnYaofFcICzB5pRi/0GA1gsglRj bfLoCbc4xc1WceT+04BhgvENKZBcn4if5MI7ClHk71auWklAP1ZOWFl6pqc6ktAILVMO K3RcZ577mHjyigspCuchsOPQirGE4gHLXKHveeY/5N15me9TqVANJSIeh3/MhRf9vu7i DGVQ== X-Gm-Message-State: ALoCoQlitgNxd4Kq/Ks2GLVr4S/NOabJBy8EY+SfcMq5h+uCewiiNpTX4Tw0F/mFrylhZIzg3n0q X-Received: by 10.180.94.5 with SMTP id cy5mr23469630wib.11.1404564489081; Sat, 05 Jul 2014 05:48:09 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id rw4sm75556376wjb.44.2014.07.05.05.48.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 05:48:08 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , Daniel Vetter , 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: Sat, 5 Jul 2014 14:49:25 +0200 Message-Id: <1404564566-21814-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=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 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/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;