From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Kluin Subject: Re: [PATCH] platinumfb: misplaced parenthesis Date: Sun, 17 May 2009 13:53:00 +0200 Message-ID: <4A0FFA9C.5000404@gmail.com> References: <4A0C0C4E.6070401@gmail.com> <20090514093827.33a099f7.akpm@linux-foundation.org> <1242343459.1867.27.camel@pasglop> <4A0DD407.9090206@gmail.com> <20090515212449.GD6520@sci.fi> <1242426067.9691.4.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by 3yr0jf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1M5evR-0008Si-Lh for linux-fbdev-devel@lists.sourceforge.net; Sun, 17 May 2009 11:53:05 +0000 Received: from mail-ew0-f169.google.com ([209.85.219.169]) by 29vjzd1.ch3.sourceforge.com with esmtp (Exim 4.69) id 1M5evQ-0007aZ-KW for linux-fbdev-devel@lists.sourceforge.net; Sun, 17 May 2009 11:53:05 +0000 Received: by ewy17 with SMTP id 17so3612978ewy.10 for ; Sun, 17 May 2009 04:53:02 -0700 (PDT) In-Reply-To: <1242426067.9691.4.camel@pasglop> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: Benjamin Herrenschmidt Cc: Paul Mackerras , =?ISO-8859-1?Q?Ville_Syrj=E4l=E4?= , linux-fbdev-devel@lists.sourceforge.net, Andrew Morton , adaplas@gmail.com Since `+' has a higher precedence than the trinary operator `?', this added `hres * (1 << color_mode)' to the boolean testing videomode and depth. Signed-off-by: Roel Kluin --- static inline int platinum_vram_reqd(int video_mode, int color_mode) { + int offset; + + if ((video_mode == VMODE_832_624_75) && (color_mode > CMODE_8)) + offset = 0x1010; + else + offset = 0x1020; + return vmode_attrs[video_mode-1].vres * - (vmode_attrs[video_mode-1].hres * (1< CMODE_8)) ? 0x10 : 0x20) + 0x1000; + (vmode_attrs[video_mode-1].hres * (1<