[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAMzoamYsL-4arwG1xu7=efhvaN9dNXpNXy=duBPHXrGxApfo6w@mail.gmail.com>
Date: Tue, 7 Jun 2016 16:37:56 +0100
From: David Binderman <linuxdev.baldrick@...il.com>
To: thomas@...ischhofer.net, plagnioj@...osoft.com,
tomi.valkeinen@...com, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org, dcb314@...mail.com
Subject: linux-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
Powered by blists - more mailing lists