[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkda1fmm0uCwdUxo5bs14u50WR4C1B7XK1vmWdh5ECnaPSg@mail.gmail.com>
Date: Thu, 23 Mar 2023 09:18:48 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH v1 2/2] gpiolib: Check array_info for NULL only once in gpiod_get_array()
On Tue, Mar 21, 2023 at 2:53 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> gpiod_get_array() has a long if-else-if branching where each of them
> tests for the same variable to be not NULL. Instead, check for NULL
> before even going to that flow.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
It's way more readable like this.
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists