diff mbox series

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

Message ID b092bbcc23529663b1a8b381efb85566453185e1.1744366571.git.viresh.kumar@linaro.org (mailing list archive)
State Under Review
Headers show
Series Rust abstractions for clk, cpumask, cpufreq, OPP | expand

Commit Message

Viresh Kumar April 11, 2025, 10:55 a.m. UTC
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(-)

Comments

Yury Norov April 11, 2025, 3:20 p.m. UTC | #1
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.
diff mbox series

Patch

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)