lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 07 Jul 2014 11:23:02 +0200
From:	Noralf Tronnes <notro@...nnes.org>
To:	Dan Carpenter <dan.carpenter@...cle.com>,
	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
CC:	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Tomi Valkeinen <tomi.valkeinen@...com>,
	Jingoo Han <jg1.han@...sung.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Mauro Carvalho Chehab <m.chehab@...sung.com>,
	"Chen, Gong" <gong.chen@...ux.intel.com>,
	linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: fbdev: sis: init.c:  Cleaning up redundant condition
 is always true

Den 07.07.2014 09:57, skrev Dan Carpenter:
> On Thu, Jul 03, 2014 at 11:15:21PM +0200, Rickard Strandqvist wrote:
>> 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)) {
>
> It might be that this was supposed to be:
>
> 		if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth <= 800) && (LCDwidth >= 600))) {
>
> But why would people write a range from high to low?  That's crazy
> people who write backwards code...
The numbers 800x600 (1024x768) indicate that LCDheight is meant to be used:
                  if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && 
(LCDheight >= 600))) {

regards,
Noralf Tronnes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ