From: Linus Walleij <linus.walleij@linaro.org>
To: Joe Perches <joe@perches.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Grant Likely <grant.likely@secretlab.ca>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH] gpio: Convert gpio_is_valid to return bool
Date: Wed, 11 May 2011 01:42:22 +0200 [thread overview]
Message-ID: <BANLkTikjcJp_PK9pBNyAk-D=MbZ7cr1BPQ@mail.gmail.com> (raw)
In-Reply-To: <1305069787.19586.141.camel@Joe-Laptop>
2011/5/11 Joe Perches <joe@perches.com>:
> Make the code a bit more readable.
>
> Instead of casting an int to an unsigned then comparing to
> MAX_NR_GPIOS, add a >= 0 test and let the compiler optimizer
> do the conversion to unsigned.
>
> The generated code should be the same.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Thanks Joe!
Linus Walleij
next prev parent reply other threads:[~2011-05-10 23:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1304363786-30376-1-git-send-email-linus.walleij@stericsson.com>
[not found] ` <1304365077.7792.40.camel@Joe-Laptop>
[not found] ` <BANLkTi=XSevO72NqCYOYuketjE8XjeQU+A@mail.gmail.com>
[not found] ` <1305067020.19586.130.camel@Joe-Laptop>
[not found] ` <BANLkTi=zDJLHUa2ogTeEkmdsbkhvGJCsEw@mail.gmail.com>
2011-05-10 23:23 ` [PATCH] gpio: Convert gpio_is_valid to return bool Joe Perches
2011-05-10 23:23 ` Joe Perches
2011-05-10 23:42 ` Linus Walleij [this message]
2011-05-27 3:02 ` Grant Likely
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='BANLkTikjcJp_PK9pBNyAk-D=MbZ7cr1BPQ@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=arnd@arndb.de \
--cc=grant.likely@secretlab.ca \
--cc=joe@perches.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@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 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).