linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] gpiolib: refactor for_each_hwgpio()
@ 2025-02-07 15:07 Andy Shevchenko
  2025-02-07 15:07 ` [PATCH v2 1/3] gpiolib: Deduplicate some code in for_each_requested_gpio_in_range() Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Andy Shevchenko @ 2025-02-07 15:07 UTC (permalink / raw)
  To: Bartosz Golaszewski, Andy Shevchenko, linux-gpio, linux-kernel
  Cc: Linus Walleij, Bartosz Golaszewski

Some of the for_each_*() macros use the very similar piece of code
that may be deduplicated (by introducing a new helper macro in patch 1).
On top of that the implementation of the low-level for_each_hwgpio_in_range()
looks too verbose. Try to simplify it (patches 2 and 3).

Changelog v2:
- added kernel-doc for a new helper (Bart)
- added two more patches

Andy Shevchenko (3):
  gpiolib: Deduplicate some code in for_each_requested_gpio_in_range()
  gpiolib: Simplify implementation of for_each_hwgpio_in_range()
  gpiolib: Switch to use for_each_if() helper

 include/linux/gpio/driver.h | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)

-- 
2.43.0.rc1.1336.g36b5255a03ac


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-02-12 14:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07 15:07 [PATCH v2 0/3] gpiolib: refactor for_each_hwgpio() Andy Shevchenko
2025-02-07 15:07 ` [PATCH v2 1/3] gpiolib: Deduplicate some code in for_each_requested_gpio_in_range() Andy Shevchenko
2025-02-07 15:07 ` [PATCH v2 2/3] gpiolib: Simplify implementation of for_each_hwgpio_in_range() Andy Shevchenko
2025-02-07 15:07 ` [PATCH v2 3/3] gpiolib: Switch to use for_each_if() helper Andy Shevchenko
2025-02-12 13:41   ` Bartosz Golaszewski
2025-02-12 14:21 ` (subset) [PATCH v2 0/3] gpiolib: refactor for_each_hwgpio() Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).