mbox series

[v3,0/4] gpiolib: A fix and a few cleanups

Message ID 20220201152758.40391-1-andriy.shevchenko@linux.intel.com
Headers show
Series gpiolib: A fix and a few cleanups | expand

Message

Andy Shevchenko Feb. 1, 2022, 3:27 p.m. UTC
Patch 1 is a fix for wrong error code to user space.
Patches 2-4 are small cleanups.

Can be routed via my tree, or directly into GPIO, whatever maintainers
prefer.

Changelog v3:
- joined two patches into a single fix (Bart)
- added Rb tag (Linus)
- renamed for_each_gpio_desc_with_flag() macro to be descriptive (Johan)
- added two new cleanups

Andy Shevchenko (4):
  gpiolib: Never return internal error codes to user space
  gpiolib: Introduce for_each_gpio_desc_with_flag() macro
  gpiolib: Use short form of ternary operator in gpiod_get_index()
  gpiolib: Simplify error path in gpiod_get_index() when requesting GPIO

 drivers/gpio/gpiolib-cdev.c  |  6 +++---
 drivers/gpio/gpiolib-of.c    | 10 ++++------
 drivers/gpio/gpiolib-sysfs.c | 14 ++++----------
 drivers/gpio/gpiolib.c       | 35 ++++++++++++++++-------------------
 drivers/gpio/gpiolib.h       | 19 +++++++++++++++++++
 5 files changed, 46 insertions(+), 38 deletions(-)

Comments

Andy Shevchenko Feb. 7, 2022, 2:43 p.m. UTC | #1
On Tue, Feb 01, 2022 at 05:27:54PM +0200, Andy Shevchenko wrote:
> Patch 1 is a fix for wrong error code to user space.
> Patches 2-4 are small cleanups.

> Can be routed via my tree, or directly into GPIO, whatever maintainers
> prefer.

Bart, if the series is okay for you tell me which route to take?

> Changelog v3:
> - joined two patches into a single fix (Bart)
> - added Rb tag (Linus)
> - renamed for_each_gpio_desc_with_flag() macro to be descriptive (Johan)
> - added two new cleanups
> 
> Andy Shevchenko (4):
>   gpiolib: Never return internal error codes to user space
>   gpiolib: Introduce for_each_gpio_desc_with_flag() macro
>   gpiolib: Use short form of ternary operator in gpiod_get_index()
>   gpiolib: Simplify error path in gpiod_get_index() when requesting GPIO
> 
>  drivers/gpio/gpiolib-cdev.c  |  6 +++---
>  drivers/gpio/gpiolib-of.c    | 10 ++++------
>  drivers/gpio/gpiolib-sysfs.c | 14 ++++----------
>  drivers/gpio/gpiolib.c       | 35 ++++++++++++++++-------------------
>  drivers/gpio/gpiolib.h       | 19 +++++++++++++++++++
>  5 files changed, 46 insertions(+), 38 deletions(-)
Bartosz Golaszewski Feb. 8, 2022, 9:36 a.m. UTC | #2
On Mon, Feb 7, 2022 at 3:44 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Feb 01, 2022 at 05:27:54PM +0200, Andy Shevchenko wrote:
> > Patch 1 is a fix for wrong error code to user space.
> > Patches 2-4 are small cleanups.
>
> > Can be routed via my tree, or directly into GPIO, whatever maintainers
> > prefer.
>
> Bart, if the series is okay for you tell me which route to take?
>

Queued the first one for fixes and 2-4 for v5.18.

Bart
Andy Shevchenko Feb. 8, 2022, 1:29 p.m. UTC | #3
On Tue, Feb 8, 2022 at 3:16 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> On Mon, Feb 7, 2022 at 3:44 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Tue, Feb 01, 2022 at 05:27:54PM +0200, Andy Shevchenko wrote:
> > > Patch 1 is a fix for wrong error code to user space.
> > > Patches 2-4 are small cleanups.
> >
> > > Can be routed via my tree, or directly into GPIO, whatever maintainers
> > > prefer.
> >
> > Bart, if the series is okay for you tell me which route to take?
>
> Queued the first one for fixes and 2-4 for v5.18.

Thank you!