Skip to content

Split devres APIs to device/devres.h and introduce devm_kmemdup_array()

Raag Jadav linux-gpio linux-iio linux-input lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest12 patches 10 repliesIn review
  2. v420 patches 11 repliesSuperseded
  3. v320 patches 24 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12err.h: move IOMEM_ERR_PTR() to err.hinclude/linux/err.h include/linux/io.h+3 -21 reply
2/12driver core: Split devres APIs to device/devres.hinclude/linux/device.h include/linux/device/devres.h+125 -1184 replies
3/12iio: imu: st_lsm9ds0: Replace device.h with what is neededdrivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c+2 -20 replies
4/12devres: Introduce devm_kmemdup_array()include/linux/device/devres.h+5 -00 replies
5/12pinctrl: intel: copy communities using devm_kmemdup_array()drivers/pinctrl/intel/pinctrl-intel.c+2 -40 replies
6/12pinctrl: baytrail: copy communities using devm_kmemdup_array()drivers/pinctrl/intel/pinctrl-baytrail.c+2 -40 replies
7/12pinctrl: cherryview: use devm_kmemdup_array()drivers/pinctrl/intel/pinctrl-cherryview.c+2 -30 replies
8/12pinctrl: tangier: use devm_kmemdup_array()drivers/pinctrl/intel/pinctrl-tangier.c+2 -30 replies
9/12pinctrl: pxa2xx: use devm_kmemdup_array()drivers/pinctrl/pxa/pinctrl-pxa2xx.c+4 -40 replies
10/12iio: adc: xilinx-xadc-core: use devm_kmemdup_array()drivers/iio/adc/xilinx-xadc-core.c+2 -21 reply
11/12input: sparse-keymap: use devm_kmemdup_array()drivers/input/sparse-keymap.c+1 -20 replies
12/12input: ipaq-micro-keys: use devm_kmemdup_array()drivers/input/keyboard/ipaq-micro-keys.c+2 -30 replies

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchJonathan CameronDmitry TorokhovLinus WalleijAndy ShevchenkoArnd BergmannGreg Kroah-Hartman
1/12A-b
2/12A-b R-b
3/12A-b
4/12R-b R-b
5/12R-b R-b
6/12R-b
7/12R-b
8/12R-b R-b
9/12R-b
10/12A-b
11/12A-b R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/12] Split devres APIs to device/devres.h and introduce devm_kmemdup_array()

This series

1. Splits device/devres.h for the users that are only interested in devres APIs. Original work by Andy Shevchenko:
https://lore.kernel.org/r/[email protected]

2. Introduces a more robust and cleaner devm_kmemdup_array() helper and uses it across drivers.

The idea behind embedding both work into a single series is to make the review process easier and reduce conflicts while merging.

Current proposal is to merge initial patches with an immutable tag (volunteered by Andy) for other subsystems to use. Feel free to share a better alternative.

v2: Use size_mul() for multiplication (Dmitry)
Update commit message (Dmitry)

v3: Embed devres.h work by Andy
Add more users of devm_kmemdup_array()
Update tags and rebase

v4: Use IOMEM_ERR_PTR() to fix sparse warnings (Andy)
Use source size and make it robust against type changes (Andy)

v5: Move IOMEM_ERR_PTR() to err.h (Andy)
Reduce distribution to pinctrl/iio/input patches

Andy Shevchenko (2):
driver core: Split devres APIs to device/devres.h
iio: imu: st_lsm9ds0: Replace device.h with what is needed

Raag Jadav (10):
err.h: move IOMEM_ERR_PTR() to err.h
devres: Introduce devm_kmemdup_array()
pinctrl: intel: copy communities using devm_kmemdup_array()
pinctrl: baytrail: copy communities using devm_kmemdup_array()
pinctrl: cherryview: use devm_kmemdup_array()
pinctrl: tangier: use devm_kmemdup_array()
pinctrl: pxa2xx: use devm_kmemdup_array()
iio: adc: xilinx-xadc-core: use devm_kmemdup_array()
input: sparse-keymap: use devm_kmemdup_array()
input: ipaq-micro-keys: use devm_kmemdup_array()

 drivers/iio/adc/xilinx-xadc-core.c          |   4 +-
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c |   2 +-
 drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c |   2 +-
 drivers/input/keyboard/ipaq-micro-keys.c    |   5 +-
 drivers/input/sparse-keymap.c               |   3 +-
 drivers/pinctrl/intel/pinctrl-baytrail.c    |   6 +-
 drivers/pinctrl/intel/pinctrl-cherryview.c  |   5 +-
 drivers/pinctrl/intel/pinctrl-intel.c       |   6 +-
 drivers/pinctrl/intel/pinctrl-tangier.c     |   5 +-
 drivers/pinctrl/pxa/pinctrl-pxa2xx.c        |   8 +-
 include/linux/device.h                      | 119 +-----------------
 include/linux/device/devres.h               | 129 ++++++++++++++++++++
 include/linux/err.h                         |   3 +
 include/linux/io.h                          |   2 -
 14 files changed, 152 insertions(+), 147 deletions(-)
 create mode 100644 include/linux/device/devres.h

base-commit: 0eee258cdf172763502f142d85e967f27a573be0

Signature · 1 line
2.34.1