From: Andrew Morton <akpm@linux-foundation.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: linux-fbdev-devel@lists.sourceforge.net,
Antonino Daplas <adaplas@gmail.com>
Subject: Re: [PATCH] fbdev: Fix test on unsigned in fb_do_show_logo()
Date: Mon, 2 Nov 2009 16:32:52 -0800 [thread overview]
Message-ID: <20091102163252.e76491e6.akpm@linux-foundation.org> (raw)
In-Reply-To: <4AD8F77A.3010802@gmail.com>
On Sat, 17 Oct 2009 00:45:14 +0200
Roel Kluin <roel.kluin@gmail.com> wrote:
> image->d[xy] are unsigned so the check was wrong.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 99bbd28..9f20641 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -403,7 +403,8 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
> image->dx += image->width + 8;
> }
> } else if (rotate == FB_ROTATE_UD) {
> - for (x = 0; x < num && image->dx >= 0; x++) {
> + for (x = 0; x < num && image->dx + image->width + 8 >= 0;
> + x++) {
> info->fbops->fb_imageblit(info, image);
> image->dx -= image->width + 8;
> }
> @@ -415,7 +416,8 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
> image->dy += image->height + 8;
> }
> } else if (rotate == FB_ROTATE_CCW) {
> - for (x = 0; x < num && image->dy >= 0; x++) {
> + for (x = 0; x < num && image->dy + image->height + 8 >= 0;
> + x++) {
> info->fbops->fb_imageblit(info, image);
> image->dy -= image->height + 8;
> }
Presumably that test isn't needed at all?
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
prev parent reply other threads:[~2009-11-03 0:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 22:45 [PATCH] fbdev: Fix test on unsigned in fb_do_show_logo() Roel Kluin
2009-11-03 0:32 ` Andrew Morton [this message]
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=20091102163252.e76491e6.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adaplas@gmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=roel.kluin@gmail.com \
/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 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).