All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roel Kluin <roel.kluin@gmail.com>
To: Imre Deak <imre.deak@nokia.com>,
	linux-fbdev-devel@lists.sourceforge.net,
	linux-omap@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] omapfb: Wrong test on unsigned?
Date: Fri, 16 Oct 2009 20:23:43 +0200	[thread overview]
Message-ID: <4AD8BA2F.9090307@gmail.com> (raw)

Only if the test is signed negative values can be spotted.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Is this correct? please review.

diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 0d0c8c8..cc7dd93 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -286,7 +286,7 @@ static int _setcolreg(struct fb_info *info, u_int regno, u_int red, u_int green,
 		if (r != 0)
 			break;
 
-		if (regno < 0) {
+		if ((int)regno < 0) {
 			r = -EINVAL;
 			break;
 		}

             reply	other threads:[~2009-10-16 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 18:23 Roel Kluin [this message]
2009-10-16 20:56 ` [PATCH] omapfb: Wrong test on unsigned? Aguirre Rodriguez, Sergio Alberto
2009-10-21 15:43   ` Roel Kluin
2009-10-21 15:39     ` Aguirre Rodriguez, Sergio Alberto
2009-10-22 18:22       ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-10-07 19:03 DVB-T problems with MUSB Koen Kooi
2009-10-21 15:43 ` [PATCH] omapfb: Wrong test on unsigned? Koen Kooi

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=4AD8BA2F.9090307@gmail.com \
    --to=roel.kluin@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=imre.deak@nokia.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-omap@vger.kernel.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.