linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: misplaced parentheses?
@ 2009-05-14 12:19 Roel Kluin
  2009-05-14 16:38 ` Andrew Morton
  0 siblings, 1 reply; 10+ messages in thread
From: Roel Kluin @ 2009-05-14 12:19 UTC (permalink / raw)
  To: adaplas; +Cc: Andrew Morton, linux-fbdev-devel

The leftmost `+' has a higher precedence than the `?' so this returns
(vres * hres * (1 << color_mode) + (VMODE && CMODE) ? 0x10 : 0x20) + 0x1000

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
The original code looks odd, but I am not entirely certain whether my patch is
correct. So please review.

diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index 03b3670..a88f4b6 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -224,7 +224,7 @@ static inline int platinum_vram_reqd(int video_mode, int color_mode)
 	return vmode_attrs[video_mode-1].vres *
 	       (vmode_attrs[video_mode-1].hres * (1<<color_mode) +
 		((video_mode == VMODE_832_624_75) &&
-		 (color_mode > CMODE_8)) ? 0x10 : 0x20) + 0x1000;
+		 (color_mode > CMODE_8) ? 0x10 : 0x20)) + 0x1000;
 }
 
 #define STORE_D2(a, d) { \

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com

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

end of thread, other threads:[~2009-05-18 10:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 12:19 [PATCH] staging: misplaced parentheses? Roel Kluin
2009-05-14 16:38 ` Andrew Morton
2009-05-14 23:24   ` Benjamin Herrenschmidt
2009-05-15 10:51     ` Roel Kluin
2009-05-15 20:43     ` [PATCH] platinumfb: misplaced parenthesis Roel Kluin
2009-05-15 21:24       ` Ville Syrjälä
2009-05-15 22:21         ` Benjamin Herrenschmidt
2009-05-17 11:53           ` Roel Kluin
2009-05-17 17:11             ` Geert Uytterhoeven
2009-05-18 10:23               ` Roel Kluin

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).