linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: fbdev: sis: init.c:  Cleaning up redundant condition is always true
@ 2014-07-03 21:15 Rickard Strandqvist
  2014-07-05 12:48 ` [PATCH] video: fbdev: sis: init.c: Cleaning up variable that is never used Rickard Strandqvist
  2014-07-07  7:57 ` [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true Dan Carpenter
  0 siblings, 2 replies; 9+ messages in thread
From: Rickard Strandqvist @ 2014-07-03 21:15 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: Rickard Strandqvist, Jingoo Han, Daniel Vetter,
	Mauro Carvalho Chehab, Chen, Gong, Dan Carpenter, linux-fbdev,
	linux-kernel

Removal of a redundant condition that is always true

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/video/fbdev/sis/init.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)) {
 			if(VDisplay = 300) ModeIndex = ModeIndex_400x300[Depth];
 		}
 		break;
 	case 512:
-		if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) {
+		if ((!(VBFlags & CRT1_LCDA)) || (LCDwidth >= 768)) {
 			if(VDisplay = 384) ModeIndex = ModeIndex_512x384[Depth];
 		}
 		break;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-07-07 20:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03 21:15 [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true Rickard Strandqvist
2014-07-05 12:48 ` [PATCH] video: fbdev: sis: init.c: Cleaning up variable that is never used Rickard Strandqvist
2014-07-05 19:23   ` Dan Carpenter
2014-07-05 19:44     ` Geert Uytterhoeven
2014-07-05 20:04       ` Dan Carpenter
2014-07-05 20:12         ` Dan Carpenter
2014-07-07  7:57 ` [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true Dan Carpenter
2014-07-07  9:23   ` Noralf Tronnes
2014-07-07 20:36     ` Rickard Strandqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).