Patchwork [8/12] arch/sparc: remove references to cpu_*_map.

login
register
mail settings
Submitter Rusty Russell
Date Feb. 15, 2012, 4:58 a.m.
Message ID <1329281884.6232.rusty@rustcorp.com.au>
Download mbox | patch
Permalink /patch/141227/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Rusty Russell - Feb. 15, 2012, 4:58 a.m.
From: Rusty Russell <rusty@rustcorp.com.au>

This has been obsolescent for a while; time for the final push.

Also get rid of obsolescent first_cpu().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/kernel/leon_kernel.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Feb. 15, 2012, 5:11 a.m.
From: Rusty Russell <rusty@rustcorp.com.au>
Date: Wed, 15 Feb 2012 15:28:04 +1030

> From: Rusty Russell <rusty@rustcorp.com.au>
> 
> This has been obsolescent for a while; time for the final push.
> 
> Also get rid of obsolescent first_cpu().
> 
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Acked-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Srivatsa S. Bhat - Feb. 15, 2012, 9:22 a.m.
On 02/15/2012 10:28 AM, Rusty Russell wrote:

> From: Rusty Russell <rusty@rustcorp.com.au>
> 
> This has been obsolescent for a while; time for the final push.
> 
> Also get rid of obsolescent first_cpu().
> 
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: sparclinux@vger.kernel.org
> ---
>  arch/sparc/kernel/leon_kernel.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c
> --- a/arch/sparc/kernel/leon_kernel.c
> +++ b/arch/sparc/kernel/leon_kernel.c
> @@ -104,11 +104,11 @@ static int irq_choose_cpu(const struct c
>  {
>  	cpumask_t mask;
>  
> -	cpus_and(mask, cpu_online_map, *affinity);
> -	if (cpus_equal(mask, cpu_online_map) || cpus_empty(mask))
> +	cpumask_and(&mask, cpu_online_mask, affinity);
> +	if (cpumask_equal(&mask, cpu_online_mask) || cpus_empty(mask))


You could even change that cpus_empty() to cpumask_empty(&mask)...
Either way, it is fine..

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Regards,
Srivatsa S. Bhat

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c
--- a/arch/sparc/kernel/leon_kernel.c
+++ b/arch/sparc/kernel/leon_kernel.c
@@ -104,11 +104,11 @@  static int irq_choose_cpu(const struct c
 {
 	cpumask_t mask;
 
-	cpus_and(mask, cpu_online_map, *affinity);
-	if (cpus_equal(mask, cpu_online_map) || cpus_empty(mask))
+	cpumask_and(&mask, cpu_online_mask, affinity);
+	if (cpumask_equal(&mask, cpu_online_mask) || cpus_empty(mask))
 		return boot_cpu_id;
 	else
-		return first_cpu(mask);
+		return cpumask_first(&mask);
 }
 #else
 #define irq_choose_cpu(affinity) boot_cpu_id