[PATCH V9 01/17] rust: cpumask: Use non-atomic helpers

Viresh Kumar posted 17 patches 10 months ago
There is a newer version of this series
[PATCH V9 01/17] rust: cpumask: Use non-atomic helpers
Posted by Viresh Kumar 10 months ago
The cpumask Rust abstractions don't need the atomic variants of helpers
for now. Use the non-atomic helpers instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 rust/helpers/cpumask.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/rust/helpers/cpumask.c b/rust/helpers/cpumask.c
index 2d380a86c34a..ae964cddbd41 100644
--- a/rust/helpers/cpumask.c
+++ b/rust/helpers/cpumask.c
@@ -2,14 +2,14 @@
 
 #include <linux/cpumask.h>
 
-void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
+void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
 {
-	cpumask_set_cpu(cpu, dstp);
+	__cpumask_set_cpu(cpu, dstp);
 }
 
-void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
+void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp)
 {
-	cpumask_clear_cpu(cpu, dstp);
+	__cpumask_clear_cpu(cpu, dstp);
 }
 
 void rust_helper_cpumask_setall(struct cpumask *dstp)
-- 
2.31.1.272.g89b43f80a514
Re: [PATCH V9 01/17] rust: cpumask: Use non-atomic helpers
Posted by Yury Norov 10 months ago
On Fri, Apr 11, 2025 at 04:25:00PM +0530, Viresh Kumar wrote:
> The cpumask Rust abstractions don't need the atomic variants of helpers
> for now. Use the non-atomic helpers instead.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  rust/helpers/cpumask.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/rust/helpers/cpumask.c b/rust/helpers/cpumask.c
> index 2d380a86c34a..ae964cddbd41 100644
> --- a/rust/helpers/cpumask.c
> +++ b/rust/helpers/cpumask.c
> @@ -2,14 +2,14 @@
>  
>  #include <linux/cpumask.h>
>  
> -void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
> +void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
>  {
> -	cpumask_set_cpu(cpu, dstp);
> +	__cpumask_set_cpu(cpu, dstp);
>  }
>  
> -void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
> +void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp)
>  {
> -	cpumask_clear_cpu(cpu, dstp);
> +	__cpumask_clear_cpu(cpu, dstp);
>  }

Please just add non-atomic helpers after atomic ones.