[PATCH 0/2] rust: regulator: relax a few constraints on Regulator<T>

Daniel Almeida posted 2 patches 2 months, 1 week ago
rust/kernel/regulator.rs | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
[PATCH 0/2] rust: regulator: relax a few constraints on Regulator<T>
Posted by Daniel Almeida 2 months, 1 week ago
This series implement two related changes to address a bit of an oversight
on my end on the initial patch for the Regulator abstraction. Note that
this is not a fix, as it just relaxes the constraints on the previous code
as it is safe to do so.

Patch 1 removes some needless &mut self for functions that already provide
their own locking on the C side.

Patch 2 implements Send and Sync. In particular, there is no reason for
Regulator<T> not to be Send, and as discussed above, it is naturally Sync.

This is based on linux-next for now, I am waiting for 6.17-rc1 to be out in
order to rebase.

---
Daniel Almeida (2):
      rust: regulator: remove needless &mut from member functions
      rust: regulator: implement Send and Sync for Regulator<T>

 rust/kernel/regulator.rs | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)
---
base-commit: 54efec8782214652b331c50646013f8526570e8d
change-id: 20250729-regulator-send-sync-94d4a7a61eff

Best regards,
-- 
Daniel Almeida <daniel.almeida@collabora.com>
Re: [PATCH 0/2] rust: regulator: relax a few constraints on Regulator<T>
Posted by Mark Brown 1 month, 3 weeks ago
On Tue, 29 Jul 2025 14:31:39 -0300, Daniel Almeida wrote:
> This series implement two related changes to address a bit of an oversight
> on my end on the initial patch for the Regulator abstraction. Note that
> this is not a fix, as it just relaxes the constraints on the previous code
> as it is safe to do so.
> 
> Patch 1 removes some needless &mut self for functions that already provide
> their own locking on the C side.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/2] rust: regulator: remove needless &mut from member functions
      commit: f7fbf3091f4cc4133574852f655593e1613d1af0
[2/2] rust: regulator: implement Send and Sync for Regulator<T>
      commit: 9a200cbdb54349909a42b45379e792e4b39dd223

All 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
Re: [PATCH 0/2] rust: regulator: relax a few constraints on Regulator<T>
Posted by Alexandre Courbot 2 months ago
On Wed Jul 30, 2025 at 2:31 AM JST, Daniel Almeida wrote:
> This series implement two related changes to address a bit of an oversight
> on my end on the initial patch for the Regulator abstraction. Note that
> this is not a fix, as it just relaxes the constraints on the previous code
> as it is safe to do so.
>
> Patch 1 removes some needless &mut self for functions that already provide
> their own locking on the C side.
>
> Patch 2 implements Send and Sync. In particular, there is no reason for
> Regulator<T> not to be Send, and as discussed above, it is naturally Sync.
>
> This is based on linux-next for now, I am waiting for 6.17-rc1 to be out in
> order to rebase.

FWIW,

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Re: [PATCH 0/2] rust: regulator: relax a few constraints on Regulator<T>
Posted by Alice Ryhl 2 months, 1 week ago
On Tue, Jul 29, 2025 at 02:31:39PM -0300, Daniel Almeida wrote:
> This series implement two related changes to address a bit of an oversight
> on my end on the initial patch for the Regulator abstraction. Note that
> this is not a fix, as it just relaxes the constraints on the previous code
> as it is safe to do so.
> 
> Patch 1 removes some needless &mut self for functions that already provide
> their own locking on the C side.
> 
> Patch 2 implements Send and Sync. In particular, there is no reason for
> Regulator<T> not to be Send, and as discussed above, it is naturally Sync.
> 
> This is based on linux-next for now, I am waiting for 6.17-rc1 to be out in
> order to rebase.
> 
> ---
> Daniel Almeida (2):
>       rust: regulator: remove needless &mut from member functions
>       rust: regulator: implement Send and Sync for Regulator<T>
> 
>  rust/kernel/regulator.rs | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)

Reviewed-by: Alice Ryhl <aliceryhl@google.com>