mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Jan Lübbe" <jlu@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] drivers gpio: Check for negativ gpio values
Date: Mon, 24 Sep 2012 11:16:52 +0200	[thread overview]
Message-ID: <1348478212.3491.1.camel@coredoba.hi.pengutronix.de> (raw)
In-Reply-To: <1348477176-25398-1-git-send-email-t.gamez@phytec.de>

On Mon, 2012-09-24 at 10:59 +0200, Teresa Gámez wrote:
>  static int gpio_is_valid(unsigned gpio)
>  {
> -	if (gpio < ARCH_NR_GPIOS)
> +	if (gpio < ARCH_NR_GPIOS && gpio >= 0)

For an 'unsigned gpio', gpio >= 0 is always true.

Regards,
Jan Lübbe
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-09-24  9:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24  8:59 Teresa Gámez
2012-09-24  8:59 ` [PATCH 2/2] ARM OMAP: switch to gpiolib support Teresa Gámez
2012-09-24 19:30   ` Sascha Hauer
2012-09-24  9:16 ` Jan Lübbe [this message]
2012-09-24  9:21   ` [PATCH 1/2] drivers gpio: Check for negativ gpio values Teresa Gamez
2012-09-24  9:34   ` Jean-Christophe PLAGNIOL-VILLARD

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=1348478212.3491.1.camel@coredoba.hi.pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox