[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110527030256.GF5032@ponder.secretlab.ca>
Date: Thu, 26 May 2011 21:02:56 -0600
From: Grant Likely <grant.likely@...retlab.ca>
To: Joe Perches <joe@...ches.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org
Subject: Re: [PATCH] gpio: Convert gpio_is_valid to return bool
On Tue, May 10, 2011 at 04:23:07PM -0700, Joe Perches wrote:
> 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@...ches.com>
Applied, thanks.
g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists