lkml.org 
[lkml]   [2016]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectlinux-4.7-rc2/drivers/video/fbdev/sis/init.c: 2* bad if tests ?
Hello there,

1.

linux-4.7-rc2/drivers/video/fbdev/sis/init.c:358]: (style) Redundant
condition: If 'LCDwidth >= 800', the comparison 'LCDwidth >= 600' is
always true.

Source code is

if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDwidth >= 600)))

Maybe better code

if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDheight >= 600)))

2.

linux-4.7-rc2/drivers/video/fbdev/sis/init.c:363]: (style) Redundant
condition: If 'LCDwidth >= 1024', the comparison 'LCDwidth >= 768' is
always true.

Source code is

if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) &&
(LCDwidth >= 768))) {

Duplicate.

Also in the same file:


[drivers/video/fbdev/sis/init.c:2663]: (style) Variable 'resindex' is
assigned a value that is never used.
[drivers/video/fbdev/sis/init.c:3562]: (style) Variable 'HBS' is
assigned a value that is never used.
[drivers/video/fbdev/sis/init.c:3616]: (style) Variable 'VBS' is
assigned a value that is never used.
[drivers/video/fbdev/sis/init.c:3597]: (style) Variable 'A' is
assigned a value that is never used.

Suggest either use these variables in some way, or delete them.

Regards

David Binderman

\
 
 \ /
  Last update: 2016-06-07 18:01    [W:0.021 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site