Convert regulator drivers to use devm_kmemdup_array()
v2 cover Convert regulator drivers to use devm_kmemdup_array()
This series converts regulator drivers to use the newly introduced[1] devm_kmemdup_array() helper. This depends on changes available on immutable tag[2].
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
v2: Split patch series per subsystem
Raag Jadav (2):
regulator: devres: use devm_kmemdup_array()
regulator: cros-ec: use devm_kmemdup_array()
drivers/regulator/cros-ec-regulator.c | 4 ++-- drivers/regulator/devres.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-)
base-commit: b8c38ccb2ca52b9a38cfeb9f89abab5d6e713221
Signature · 1 line
2.34.1
PATCH v2 1/2 regulator: devres: use devm_kmemdup_array()
Convert to use devm_kmemdup_array() which is more robust.
--- drivers/regulator/devres.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/regulator/devres.c +2 -3
@@ -332,9 +332,8 @@ int devm_regulator_bulk_get_const(struct device *dev, int num_consumers,const struct regulator_bulk_data *in_consumers, struct regulator_bulk_data **out_consumers) { - *out_consumers =devm_kmemdup (dev, in_consumers, - num_consumers *sizeof (*in_consumers), -GFP_KERNEL ); + *out_consumers =devm_kmemdup_array (dev, in_consumers, num_consumers, +sizeof (*in_consumers),GFP_KERNEL );if (*out_consumers ==NULL )return -ENOMEM ;
Signature · 1 line
2.34.1
PATCH v2 2/2 regulator: cros-ec: use devm_kmemdup_array()
In reply to Raag JadavConvert to use devm_kmemdup_array() and while at it, make the size robust against type changes.
--- drivers/regulator/cros-ec-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/cros-ec-regulator.c +2 -2
@@ -138,8 +138,8 @@ static int cros_ec_regulator_init_info(struct device *dev, data->num_voltages =min_t (u16,ARRAY_SIZE (resp.voltages_mv), resp.num_voltages); data->voltages_mV = -devm_kmemdup (dev, resp.voltages_mv, -sizeof (u16) * data->num_voltages,GFP_KERNEL ); +devm_kmemdup_array (dev, resp.voltages_mv, data->num_voltages, +sizeof (resp.voltages_mv[0 ]),GFP_KERNEL );if (!data->voltages_mV)return -ENOMEM ;
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 8 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/2] regulator: devres: use devm_kmemdup_array()
commit: 6ddd1159825c516b8f64fda83177c161434141f5
[2/2] regulator: cros-ec: use devm_kmemdup_array()
commit: c5c4ce6612bb25ce6d6936d8ade96fcba635da54All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 5 lines · Mark Brown
Quoted 4 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].
Quoted 8 lines
Quoted 4 lines
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thank you.
Unless there's a nuance intended in the merge series title that I'm unable to understand, it probably seems incomplete.
Raag
Quoted 11 lines · Raag Jadav
Quoted 10 lines · Mark Brown
Quoted 8 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Quoted 8 lines
Quoted 3 lines
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thank you.
Unless there's a nuance intended in the merge series title that I'm unable to understand, it probably seems incomplete.
I believe it's an issue somewhere in the scripts. The long Subject line is split in the mailbox and that's probably is not supported by the machinery.
You are not the only one who reports this issue.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 18 lines · Andy Shevchenko
Quoted 17 lines · Raag Jadav
Quoted 5 lines · Mark Brown
Quoted 4 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].Quoted 8 lines
Quoted 4 lines
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thank you.
Quoted 7 lines
Quoted 2 lines
Unless there's a nuance intended in the merge series title that I'm unable to understand, it probably seems incomplete.
I believe it's an issue somewhere in the scripts. The long Subject line is split in the mailbox and that's probably is not supported by the machinery.
You are not the only one who reports this issue.
While I'm not well educated on the machinery, I'm also seeing devm_kmemdup_array() introduction commit reordered in -next and thinking perhaps it can cause issues with bisect, especially after final merge into Linus' tree?
Raag
Quoted 22 lines · Raag Jadav
Quoted 21 lines · Andy Shevchenko
Quoted 19 lines · Raag Jadav
Quoted 5 lines · Mark Brown
Quoted 4 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].Quoted 8 lines
Quoted 4 lines
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thank you.
Unless there's a nuance intended in the merge series title that I'm unable to understand, it probably seems incomplete.
Quoted 8 lines
Quoted 4 lines
I believe it's an issue somewhere in the scripts. The long Subject line is split in the mailbox and that's probably is not supported by the machinery.
You are not the only one who reports this issue.
While I'm not well educated on the machinery, I'm also seeing
devm_kmemdup_array()introduction commit reordered in -next and thinking perhaps it can cause issues with bisect, especially after final merge into Linus' tree?
I;m not sure what you exactly pointing out here. Mark seems applied only necessary part of the immutable tag, which have the same effect. The Git merges only once the stuff as long as it has the same hash.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 28 lines · Andy Shevchenko
Quoted 27 lines · Raag Jadav
Quoted 25 lines · Andy Shevchenko
Quoted 11 lines · Raag Jadav
Quoted 10 lines · Mark Brown
Quoted 8 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Quoted 8 lines
Quoted 3 lines
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thank you.
Unless there's a nuance intended in the merge series title that I'm unable to understand, it probably seems incomplete.
I believe it's an issue somewhere in the scripts. The long Subject line is split in the mailbox and that's probably is not supported by the machinery.
You are not the only one who reports this issue.
Quoted 7 lines
Quoted 3 lines
While I'm not well educated on the machinery, I'm also seeing
devm_kmemdup_array()introduction commit reordered in -next and thinking perhaps it can cause issues with bisect, especially after final merge into Linus' tree?I;m not sure what you exactly pointing out here. Mark seems applied only necessary part of the immutable tag, which have the same effect. The Git merges only once the stuff as long as it has the same hash.
$ git describe next-20250306
$ git log --oneline --grep raag
...
1f4c7f3b3afa Merge patch series "Split devres APIs to device/devres.h and introduce devm_kmemdup_array()" a103b833ac38 devres: Introduce devm_kmemdup_array()b8c38ccb2ca5 input: ipaq-micro-keys: use devm_kmemdup_array()cdcc09a495a4 input: sparse-keymap: use devm_kmemdup_array()a0d78eec8839 iio: adc: xilinx-xadc-core: use devm_kmemdup_array()86068aca7548 pinctrl: pxa2xx: use devm_kmemdup_array()91bfcc7a2fdb pinctrl: tangier: use devm_kmemdup_array()d795fb90d6c6 pinctrl: cherryview: use devm_kmemdup_array()f192c8447f4e pinctrl: baytrail: copy communities using devm_kmemdup_array()753764aa8eb5 pinctrl: intel: copy communities using devm_kmemdup_array()a21cad931276 driver core: Split devres APIs to device/devres.h18311a766c58 err.h: move IOMEM_ERR_PTR() to err.h
I'm expecting commit a103b833ac38 to be before its users, or perhaps I'm doing something wrong here?
Raag
Quoted 33 lines · Raag Jadav
Quoted 32 lines · Andy Shevchenko
Quoted 30 lines · Raag Jadav
Quoted 18 lines · Andy Shevchenko
Quoted 17 lines · Raag Jadav
Quoted 5 lines · Mark Brown
Quoted 4 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].Quoted 8 lines
Quoted 4 lines
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thank you.
Quoted 7 lines
Quoted 2 lines
Unless there's a nuance intended in the merge series title that I'm unable to understand, it probably seems incomplete.
I believe it's an issue somewhere in the scripts. The long Subject line is split in the mailbox and that's probably is not supported by the machinery.
You are not the only one who reports this issue.
While I'm not well educated on the machinery, I'm also seeing
devm_kmemdup_array()introduction commit reordered in -next and thinking perhaps it can cause issues with bisect, especially after final merge into Linus' tree?
Quoted 8 lines
Quoted 3 lines
I;m not sure what you exactly pointing out here. Mark seems applied only necessary part of the immutable tag, which have the same effect. The Git merges only once the stuff as long as it has the same hash.
$ git describe next-20250306$ git log --oneline --grep raag
--author="Raag ..."
...
Quoted 13 lines
1f4c7f3b3afaMerge patch series "Split devres APIs todevice/devres.hand introducedevm_kmemdup_array()"a103b833ac38devres: Introducedevm_kmemdup_array()b8c38ccb2ca5input: ipaq-micro-keys: usedevm_kmemdup_array()cdcc09a495a4input: sparse-keymap: usedevm_kmemdup_array()a0d78eec8839iio: adc: xilinx-xadc-core: usedevm_kmemdup_array()86068aca7548pinctrl: pxa2xx: usedevm_kmemdup_array()91bfcc7a2fdbpinctrl: tangier: usedevm_kmemdup_array()d795fb90d6c6pinctrl: cherryview: usedevm_kmemdup_array()f192c8447f4epinctrl: baytrail: copy communities usingdevm_kmemdup_array()753764aa8eb5pinctrl: intel: copy communities usingdevm_kmemdup_array()a21cad931276driver core: Split devres APIs todevice/devres.h18311a766c58err.h: moveIOMEM_ERR_PTR()toerr.h
Quoted 2 lines
I'm expecting commit
a103b833ac38to be before its users, or perhaps I'm doing something wrong here?
$ git tag --contains a103b833ac38 ib-devres-iio-input-pinctrl-v6.15 next-20250225 next-20250226 next-20250227 next-20250228 next-20250303 next-20250304 next-20250305 next-20250306
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 44 lines · Andy Shevchenko
Quoted 33 lines · Raag Jadav
Quoted 32 lines · Andy Shevchenko
Quoted 30 lines · Raag Jadav
Quoted 18 lines · Andy Shevchenko
Quoted 17 lines · Raag Jadav
Quoted 5 lines · Mark Brown
Quoted 4 lines · Raag Jadav
This series converts regulator drivers to use the newly introduced[1]
devm_kmemdup_array()helper. This depends on changes available on immutable tag[2].Quoted 8 lines
Quoted 4 lines
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected][...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thank you.
Quoted 7 lines
Quoted 2 lines
Unless there's a nuance intended in the merge series title that I'm unable to understand, it probably seems incomplete.
I believe it's an issue somewhere in the scripts. The long Subject line is split in the mailbox and that's probably is not supported by the machinery.
You are not the only one who reports this issue.
While I'm not well educated on the machinery, I'm also seeing
devm_kmemdup_array()introduction commit reordered in -next and thinking perhaps it can cause issues with bisect, especially after final merge into Linus' tree?Quoted 8 lines
Quoted 3 lines
I;m not sure what you exactly pointing out here. Mark seems applied only necessary part of the immutable tag, which have the same effect. The Git merges only once the stuff as long as it has the same hash.
$ git describe next-20250306$ git log --oneline --grep raag--author="Raag ..."
...
Quoted 16 lines
Quoted 13 lines
1f4c7f3b3afaMerge patch series "Split devres APIs todevice/devres.hand introducedevm_kmemdup_array()"a103b833ac38devres: Introducedevm_kmemdup_array()b8c38ccb2ca5input: ipaq-micro-keys: usedevm_kmemdup_array()cdcc09a495a4input: sparse-keymap: usedevm_kmemdup_array()a0d78eec8839iio: adc: xilinx-xadc-core: usedevm_kmemdup_array()86068aca7548pinctrl: pxa2xx: usedevm_kmemdup_array()91bfcc7a2fdbpinctrl: tangier: usedevm_kmemdup_array()d795fb90d6c6pinctrl: cherryview: usedevm_kmemdup_array()f192c8447f4epinctrl: baytrail: copy communities usingdevm_kmemdup_array()753764aa8eb5pinctrl: intel: copy communities usingdevm_kmemdup_array()a21cad931276driver core: Split devres APIs todevice/devres.h18311a766c58err.h: moveIOMEM_ERR_PTR()toerr.hQuoted 2 lines
I'm expecting commit
a103b833ac38to be before its users, or perhaps I'm doing something wrong here?
Quoted 10 lines
$ git tag --contains a103b833ac38 ib-devres-iio-input-pinctrl-v6.15 next-20250225 next-20250226 next-20250227 next-20250228 next-20250303 next-20250304 next-20250305 next-20250306
Ah, and this:
$ git cat-file commit 753764aa8eb5 tree 7d99d7bb009118f7c0d8cbac9aa2ae321fc74785 parent a103b833ac3806b816bc993cba77d0b17cf801f1 author Raag Jadav <[email protected]> 1739341506 +0530 committer Andy Shevchenko <[email protected]> 1740391732 +0200
pinctrl: intel: copy communities using devm_kmemdup_array()
...
Most likely it uses the one which was merged earlier by Stephen, who merged the ASoC before merging my immutable tag.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 3 lines · Andy Shevchenko
I;m not sure what you exactly pointing out here. Mark seems applied only necessary part of the immutable tag, which have the same effect. The Git merges only once the stuff as long as it has the same hash.
Yes, there was a lot of random IIO stuff applied on top of the API change so I rolled back to the API change.