From patchwork Thu Jul 3 21:15:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4477111 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 B0D919F358 for ; Thu, 3 Jul 2014 21:14:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4B6B203E3 for ; Thu, 3 Jul 2014 21:14:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1C012203E1 for ; Thu, 3 Jul 2014 21:14:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759625AbaGCVOJ (ORCPT ); Thu, 3 Jul 2014 17:14:09 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:49006 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759619AbaGCVOI (ORCPT ); Thu, 3 Jul 2014 17:14:08 -0400 Received: by mail-wi0-f173.google.com with SMTP id cc10so12017920wib.12 for ; Thu, 03 Jul 2014 14:14:06 -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=DAmXm4X3aHMWS3MdUjETmaCfXeZAQnJK4+xu8BGNe4w=; b=krlIJMUxc9TFUqAlcMjePTNHsjAZfsln4bxRMDaOkhDJ/yb68Ropinj+bR55+KQfK2 3sGJ946/KCf6c6eGKF3qgiYzfZ5yzQzdZJdLeZFkSdlm8bCjEN9NF6fkmo454iVTe2Ft uGC/xhh5tPn9Kb/YK5WCuMIPZl//W3flfJsz55tbM2mP9o7H+oiDOUZ+xzo3Z+40WaLA C2aZUoeN34BnAkTMHLsUy0Z9cE+9/F6SQhntrbMbb69AxhdZAhFrZNKpPnz3667SzgLk xant4LhDxpZE2ucihsOkKLpBvs+63jmsDUIhGu+3Ck8lfuvhUameYGte+SIPs+c9u0SK k0rw== X-Gm-Message-State: ALoCoQlu4B+3nYLD0VNcyclFkxW7UvLt3h8lWKmjL7B1QG4NRrE6eyvjKOB3k2CjDqS7Eg6IsUzP X-Received: by 10.180.212.73 with SMTP id ni9mr51703525wic.59.1404422046247; Thu, 03 Jul 2014 14:14:06 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id dt7sm71177220wic.6.2014.07.03.14.14.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jul 2014 14:14:05 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Daniel Vetter , Mauro Carvalho Chehab , "Chen, Gong" , Dan Carpenter , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true Date: Thu, 3 Jul 2014 23:15:21 +0200 Message-Id: <1404422121-11298-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, T_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 Removal of a redundant condition that is always true This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/sis/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c index bd40f5e..9e2dd96 100644 --- a/drivers/video/fbdev/sis/init.c +++ b/drivers/video/fbdev/sis/init.c @@ -355,12 +355,12 @@ SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, } break; case 400: - if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDwidth >= 600))) { + if ((!(VBFlags & CRT1_LCDA)) || (LCDwidth >= 600)) { if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth]; } break; case 512: - if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) { + if ((!(VBFlags & CRT1_LCDA)) || (LCDwidth >= 768)) { if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth]; } break;