linux-4.7-rc2/drivers/video/fbdev/sis/init.c: 2* bad if tests ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux