[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTikjcJp_PK9pBNyAk-D=MbZ7cr1BPQ@mail.gmail.com>
Date: Wed, 11 May 2011 01:42:22 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Joe Perches <joe@...ches.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Grant Likely <grant.likely@...retlab.ca>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH] gpio: Convert gpio_is_valid to return bool
2011/5/11 Joe Perches <joe@...ches.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@...ches.com>
Acked-by: Linus Walleij <linus.walleij@...aro.org>
Thanks Joe!
Linus Walleij
--
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