Messages in this thread | | | Date | Tue, 23 Oct 2012 00:13:49 +0200 | Subject | Re: [PATCH v2] gpiolib: Refactor gpio_export | From | Linus Walleij <> |
| |
On Mon, Oct 22, 2012 at 2:39 AM, Ryan Mallon <rmallon@gmail.com> wrote:
> The gpio_export function uses nested if statements and the status > variable to handle the failure cases. This makes the function logic > difficult to follow. Refactor the code to abort immediately on failure > using goto. This makes the code slightly longer, but significantly > reduces the nesting and number of split lines and makes the code easier > to read.
Splendid, patch applied!
> Signed-off-by: Ryan Mallon
Interesting that you sign off without an email address, I just added it thinking it was a mistake.
Yours, Linus Walleij
| |