From patchwork Sun Jun 15 21:52:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4355461 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 A89C19F314 for ; Sun, 15 Jun 2014 21:51:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DACEC2020E for ; Sun, 15 Jun 2014 21:51:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 997EF201ED for ; Sun, 15 Jun 2014 21:51:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752336AbaFOVv0 (ORCPT ); Sun, 15 Jun 2014 17:51:26 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:44022 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbaFOVvQ (ORCPT ); Sun, 15 Jun 2014 17:51:16 -0400 Received: by mail-wi0-f173.google.com with SMTP id cc10so3136531wib.0 for ; Sun, 15 Jun 2014 14:51:14 -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:in-reply-to :references; bh=/vJJxpGidBY+tcWy0YuDPeGRLeOYacbLPi6d8D3tzss=; b=DzkgJin281U9+cfxTDIwe1ZXmmF5aUYM//dOgvKHmvv8k6uHwjUVGE6YC0uwWeOZNv R/XKKohkrRPkGH9pKFqKmNrv+VnzABnMUsAItyM+EXCPtPCrqw/VsTXyMfdyh+LlaFu/ yoHSZVQO3mnQw2NqWgneEhfQ1rpbiJz3y1gUnSOWGxwn5K1JX0noN9NwDpZ3X5PMtUWm SzvzUj74XSy67jg9HJNTVlUythGucDVRSC2MjB7fODM7QnN/3ho5OSoZ9xedVmhbe0oh r+6/2MGXKulYshtsYZNQ63B3ySrxAmOqWddKeXh5xN3+hR7C2YkMDFAyDpWHrwqGcT61 tdpA== X-Gm-Message-State: ALoCoQnwmamKhiq9lzdquVDkdv5xmB0WSYlABtIJ2vGp/FeCO3gjcJgix5PEthuDgaJoJ8KmMxHR X-Received: by 10.194.142.205 with SMTP id ry13mr22259713wjb.69.1402869074454; Sun, 15 Jun 2014 14:51:14 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id f3sm29349549eep.40.2014.06.15.14.51.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Jun 2014 14:51:13 -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 useless if statement Date: Sun, 15 Jun 2014 23:52:10 +0200 Message-Id: <1402869130-4962-2-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402869130-4962-1-git-send-email-rickard_strandqvist@spectrumdigital.se> References: <1402869130-4962-1-git-send-email-rickard_strandqvist@spectrumdigital.se> 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.5 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 Same code is run regardless of the outcome of the if statement. And sets a variable that is missed, a probable cut and paste mistake. Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/sis/init301.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c index a89e3ca..008ab4a 100644 --- a/drivers/video/fbdev/sis/init301.c +++ b/drivers/video/fbdev/sis/init301.c @@ -1714,7 +1714,7 @@ SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sh SiS_Pr->PanelVCLKIdx315 = VCLK81_315; /* ? */ } else { SiS_Pr->PanelHT = 1688; SiS_Pr->PanelVT = 802; - SiS_Pr->PanelHRS = 48; SiS_Pr->PanelHRS = 112; + SiS_Pr->PanelHRS = 48; SiS_Pr->PanelHRE = 112; SiS_Pr->PanelVRS = 3; SiS_Pr->PanelVRE = 6; SiS_Pr->PanelVCLKIdx300 = VCLK81_300; SiS_Pr->PanelVCLKIdx315 = VCLK81_315; @@ -6850,11 +6850,9 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short if(SiS_Pr->SiS_VGAHDE >= 1280) { tempch = 20; tempbx &= ~0x20; - } else if(SiS_Pr->SiS_VGAHDE >= 1024) { - tempch = 25; } else { - tempch = 25; /* OK */ - } + tempch = 25; /* OK */ + } } } } @@ -7971,13 +7969,8 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short } } else { /* ---- PAL ---- */ /* We don't play around with FSCI in PAL mode */ - if(resindex == 0x04) { - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ - } else { - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ - } + SiS_SetCH70xxANDOR(SiS_Pr, 0x20, 0x00, 0xEF); /* loop filter off */ + SiS_SetCH70xxANDOR(SiS_Pr, 0x21, 0x01, 0xFE); /* ACIV on */ } #endif /* 300 */ @@ -9663,8 +9656,6 @@ SetDelayComp(struct SiS_Private *SiS_Pr, unsigned short ModeNo) delay = 0x0a; } else if(IS_SIS740) { delay = 0x00; - } else if(SiS_Pr->ChipType < SIS_330) { - delay = 0x0c; } else { delay = 0x0c; }