[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMRc=Mdyv5Et0ZsncgrxNkKa_F=VNzBqc9obnz-XH-1jgWSjdg@mail.gmail.com>
Date: Tue, 5 Apr 2022 14:20:34 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v2 1/1] gpiolib: Get rid of redundant 'else'
On Wed, Mar 30, 2022 at 5:06 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> In the snippets like the following
>
> if (...)
> return / goto / break / continue ...;
> else
> ...
>
> the 'else' is redundant. Get rid of it. In case of IOCTLs use
> switch-case pattern that seems the usual in such cases.
>
> While at it, clarify necessity of else in gpiod_direction_output()
> by attaching else if to the closing curly brace on a previous line.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
Applied, thanks!
Bart
Powered by blists - more mailing lists