[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeRshC3Db8Q2J80fk7=UvLiRymrkoAbuWceOfncfzvr7A@mail.gmail.com>
Date: Wed, 13 Jul 2022 11:59:10 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Kent Gibson <warthog618@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>,
Dipen Patel <dipenp@...dia.com>
Subject: Re: [PATCH 4/6] gpiolib: cdev: simplify line event identification
On Wed, Jul 13, 2022 at 3:39 AM Kent Gibson <warthog618@...il.com> wrote:
>
> Reorganise line event identification code to reduce code duplication,
> and replace if-else initializers with the ternary equivalent to
> improve readability.
...
> + le.id = level ? GPIO_V2_LINE_EVENT_RISING_EDGE :
> + GPIO_V2_LINE_EVENT_FALLING_EDGE;
It seems several times you are doing the same, perhaps a helper?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists