All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] gpio: altera_pio: Fix inversed logic of gpio_is_valid() implementation
Date: Mon, 29 Jul 2013 11:16:58 +0200	[thread overview]
Message-ID: <20130729111658.39cc0c27@lilith> (raw)
In-Reply-To: <1371287438.4051.2.camel@phoenix>

Hi Axel,

On Sat, 15 Jun 2013 17:10:38 +0800, Axel Lin <axel.lin@ingics.com>
wrote:

> The implementation of gpio_is_valid() has inversed logic, fix it.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> Hi,
> I don't have this hardware to test, but current code looks obviously wrong.
> I'd appreciate if someone can review and test this patch.
> 
> Axel
>  drivers/gpio/altera_pio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Not sure why this was assigned to me, as this is not ARM related.
Delegating to Thomas Chou as the NIOS(II) custodian and Cc:ing him, as
well as Scott McNutt, nios2-generic maintainer.

> diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c
> index fb03760..7ab6df8 100644
> --- a/drivers/gpio/altera_pio.c
> +++ b/drivers/gpio/altera_pio.c
> @@ -294,6 +294,6 @@ int gpio_is_valid(int number)
>  	int gidx = altera_pio_gidx(number);
>  
>  	if (gidx < 0)
> -		return 1;
> -	return 0;
> +		return 0;
> +	return 1;
>  }

Amicalement,
-- 
Albert.

  reply	other threads:[~2013-07-29  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15  9:10 [U-Boot] [PATCH] gpio: altera_pio: Fix inversed logic of gpio_is_valid() implementation Axel Lin
2013-07-29  9:16 ` Albert ARIBAUD [this message]
2013-08-05  0:26   ` Axel Lin

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=20130729111658.39cc0c27@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /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.