Skip to content

gpiolib: refactor for_each_hwgpio()

Andy Shevchenko linux-gpio lkml 2 versions – Applied

Status from this message: I applied patches 1 and 2. Please revisit 3/3 in order to not duplicate

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesApplied
  2. v11 patch 4 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3gpiolib: Deduplicate some code in for_each_requested_gpio_in_range()include/linux/gpio/driver.h+21 -140 replies
2/3gpiolib: Simplify implementation of for_each_hwgpio_in_range()include/linux/gpio/driver.h+3 -50 replies
3/3gpiolib: Switch to use for_each_if() helperinclude/linux/gpio/driver.h+4 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] gpiolib: refactor for_each_hwgpio()

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(-)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac