All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
Cc: Geert.Uytterhoeven@sonycom.com, linuxppc-dev@ozlabs.org,
	linux-fbdev-devel@lists.sourceforge.net, cbe-oss-dev@ozlabs.org,
	adaplas@gmail.com
Subject: Re: [patch 09/11] ps3fb: Round up video modes
Date: Sat, 26 Jan 2008 22:01:43 -0800	[thread overview]
Message-ID: <20080126220143.16c8f821.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080125153107.478948955@vixen.sonytel.be>

> On Fri, 25 Jan 2008 16:06:32 +0100 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
>  static int ps3fb_cmp_mode(const struct fb_videomode *vmode,
>  			  const struct fb_var_screeninfo *var)
>  {
> -	/* resolution + black border must match a native resolution */
> -	if (vmode->left_margin + vmode->xres + vmode->right_margin !=
> -	    var->left_margin + var->xres + var->right_margin ||
> -	    vmode->upper_margin + vmode->yres + vmode->lower_margin !=
> -	    var->upper_margin + var->yres + var->lower_margin)
> +	long xres, yres, left_margin, right_margin, upper_margin, lower_margin;
> +	long dx, dy;

I don't think these need to be longs?  And they probably don't need to be
signed either.

If a switch to u32 improves the code any, it might be worth doing..

All the typecasting which this patch adds makes me wonder if the choice
of types requires a general revisit...

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geert.Uytterhoeven@sonycom.com, linuxppc-dev@ozlabs.org,
	linux-fbdev-devel@lists.sourceforge.net, cbe-oss-dev@ozlabs.org,
	adaplas@gmail.com
Subject: Re: [patch 09/11] ps3fb: Round up video modes
Date: Sat, 26 Jan 2008 22:01:43 -0800	[thread overview]
Message-ID: <20080126220143.16c8f821.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080125153107.478948955@vixen.sonytel.be>

> On Fri, 25 Jan 2008 16:06:32 +0100 Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
>  static int ps3fb_cmp_mode(const struct fb_videomode *vmode,
>  			  const struct fb_var_screeninfo *var)
>  {
> -	/* resolution + black border must match a native resolution */
> -	if (vmode->left_margin + vmode->xres + vmode->right_margin !=
> -	    var->left_margin + var->xres + var->right_margin ||
> -	    vmode->upper_margin + vmode->yres + vmode->lower_margin !=
> -	    var->upper_margin + var->yres + var->lower_margin)
> +	long xres, yres, left_margin, right_margin, upper_margin, lower_margin;
> +	long dx, dy;

I don't think these need to be longs?  And they probably don't need to be
signed either.

If a switch to u32 improves the code any, it might be worth doing..

All the typecasting which this patch adds makes me wonder if the choice
of types requires a general revisit...

  reply	other threads:[~2008-01-27  6:01 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 15:06 [patch 00/11] ps3av/3fb patches for 2.6.25 Geert Uytterhoeven
2008-01-25 15:06 ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 01/11] ps3av: ps3av_get_scanmode() and ps3av_get_refresh_rate() are unused Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 02/11] ps3: Use symbolic names for video modes Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 03/11] ps3fb: Kill PS3FB_FULL_MODE_BIT Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 04/11] ps3fb: Inline macros that are used only once Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-27  6:01   ` Andrew Morton
2008-01-27  6:01     ` Andrew Morton
2008-01-27  9:34     ` Geert Uytterhoeven
2008-01-27  9:34       ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 05/11] ps3fb: Kill ps3fb_res Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 06/11] ps3fb: Make frame buffer offsets unsigned int Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 07/11] ps3fb: Add support for configurable black borders Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 08/11] ps3fb: Reorganize modedb handling Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 09/11] ps3fb: Round up video modes Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-27  6:01   ` Andrew Morton [this message]
2008-01-27  6:01     ` Andrew Morton
2008-01-27  9:53     ` Geert Uytterhoeven
2008-01-27  9:53       ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 10/11] ps3fb: Cleanup sweep Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-25 15:06 ` [patch 11/11] ps3fb: Fix modedb typos Geert Uytterhoeven
2008-01-25 15:06   ` Geert Uytterhoeven
2008-01-27  6:01 ` [patch 00/11] ps3av/3fb patches for 2.6.25 Andrew Morton
2008-01-27  6:01   ` Andrew Morton
2008-01-27  9:44   ` Geert Uytterhoeven
2008-01-27  9:44     ` Geert Uytterhoeven
2008-01-27 10:16     ` Andrew Morton
2008-01-27 10:16       ` Andrew Morton
2008-01-27 11:15       ` Geert Uytterhoeven
2008-01-27 11:15         ` Geert Uytterhoeven
2008-01-27 13:42         ` Josh Boyer
2008-01-27 13:42           ` Josh Boyer
2008-01-27 16:15           ` Jon Loeliger
2008-01-27 16:15             ` Jon Loeliger
2008-01-27 20:01         ` Geoff Levand
2008-01-27 20:01           ` Geoff Levand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080126220143.16c8f821.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=adaplas@gmail.com \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.