Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3306954imw; Mon, 18 Jul 2022 06:00:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uwiN+leHtvc+NxMTUyCrKR6hWRnjMwOH0NqRF+4QNIqVL+O8lXF4bgJUiaK6TiUfqIxukJ X-Received: by 2002:a05:6808:120f:b0:325:bc53:2150 with SMTP id a15-20020a056808120f00b00325bc532150mr13516741oil.139.1658149205484; Mon, 18 Jul 2022 06:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658149205; cv=none; d=google.com; s=arc-20160816; b=XrqZdfJ3pVh0VVeHpQLkgANfvybQo2OOK8Z3US+/bOGhhJJvqftzYUbj/Hl4iFYzIT gOWJ9kK9ICCz014G5tZOyv45msJOU766TvafyGdtF5AsR9FgB5GqSJAROBDDHAd36/U9 yPdkci8XmzlgB0jUzXWARhu3+6ewRO8yetnhPSTQTHCF47NBMGru/57sQ400SF5h9Tcl ety7fIhnMw+LjxEeWJprp+S9MTQuRL81Ncl6CMQR6cOQ6YFLT70Mjt7UPAdFSGnoZy1h CpRlh0EG8Dc4JjghaK69a9Ht9HrviufHCtRda54/xM5eXqncvuNF1Eu1sqWL6OfAolvi VqlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=grZ6pIDk580S8D7Sdkb++12nnEHO7rD9/bhYXZLaBBY=; b=kastNRU4pBdjniXL2AgxrBg3cdqVbqS6oIWQDVdtbp2pwmpPVpFUVMQBjJ0XIxOW/B XVWM75ieJE25tVUCF1wH3YpbF8pt79S1EBz/hHZTnXfEB6RSvyqWcd3a0Y9jTFAPG9tX Ku2vKpdeib9QRU1F8iM84girwcwZUMLM6KCvQ/AjYeegNvKB/n5CTjT1yiur/XZRwPqB VdGgobw2e2X5xPfwAu25Ch9jC0ND9bysOPrhOqAzbAVV4yl8cXweScWQkQ6e2hcW67Vm G1kmZty//c0+bMh+PdTf8ZL+G0hD94YRTmZ/JR5W6EHRaXUpshf44KeRI0cNqA1odHTJ y2ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z28-20020a0568301dbc00b0061c6483a6basi10636773oti.165.2022.07.18.05.59.52; Mon, 18 Jul 2022 06:00:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235138AbiGRMoR (ORCPT + 99 others); Mon, 18 Jul 2022 08:44:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235106AbiGRMoJ (ORCPT ); Mon, 18 Jul 2022 08:44:09 -0400 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EA3726126; Mon, 18 Jul 2022 05:44:02 -0700 (PDT) Received: from rustam-GF63-Thin-9RCX.intra.ispras.ru (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPS id 8751E40D4004; Mon, 18 Jul 2022 12:43:57 +0000 (UTC) From: Rustam Subkhankulov To: Thomas Winischhofer Cc: Rustam Subkhankulov , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Alexey Khoroshilov , ldv-project@linuxtesting.org Subject: [PATCH] video/fbdev/sis: fix typos in SiS_GetModeID() Date: Mon, 18 Jul 2022 15:43:43 +0300 Message-Id: <20220718124344.46338-1-subkhankulov@ispras.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The second operand of a '&&' operator has no impact on expression result for cases 400 and 512 in SiS_GetModeID(). Judging by the logic and the names of the variables, in both cases a typo was made. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") --- 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 b568c646a76c..2ba91d62af92 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 >= 800) && (LCDheight >= 600))) { if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth]; } break; case 512: - if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) { + if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDheight >= 768))) { if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth]; } break; -- 2.25.1