lkml.org 
[lkml]   [2014]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true
From
2014-07-07 11:23 GMT+02:00 Noralf Tronnes <notro@tronnes.org>:
> 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

Hi

Nice, this is what is the point of fix this type of minor errors.
Sometimes you can find something more serious :)

New patch on the way!

Kind regards
Rickard Strandqvist


\
 
 \ /
  Last update: 2014-07-08 00:01    [W:0.075 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site