cpumask: remove __first_cpu / __next_cpu
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 18 Apr 2015 01:48:27 +0000 (11:18 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 19 Apr 2015 05:05:32 +0000 (14:35 +0930)
They were for use by the deprecated first_cpu() and next_cpu() wrappers,
but sparc used them directly.

They're now replaced by cpumask_first / cpumask_next.  And __next_cpu_nr
is completely obsolete.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/time_32.c
lib/cpumask.c

index 2f80d23a0a44964ebff804a2ab4428b9f30cb162..73825f431b0c04d63de37833fea8a592a20899c0 100644 (file)
@@ -198,7 +198,7 @@ static __init int setup_timer_cs(void)
 static void percpu_ce_setup(enum clock_event_mode mode,
                        struct clock_event_device *evt)
 {
-       int cpu = __first_cpu(evt->cpumask);
+       int cpu = cpumask_first(evt->cpumask);
 
        switch (mode) {
                case CLOCK_EVT_MODE_PERIODIC:
@@ -218,7 +218,7 @@ static void percpu_ce_setup(enum clock_event_mode mode,
 static int percpu_ce_set_next_event(unsigned long delta,
                                    struct clock_event_device *evt)
 {
-       int cpu = __first_cpu(evt->cpumask);
+       int cpu = cpumask_first(evt->cpumask);
        unsigned int next = (unsigned int)delta;
 
        sparc_config.load_profile_irq(cpu, next);
index ba379d12bb57e32640d8892b3c39041d53e40bb4..75379b759d3f64e55fbd9cb9768449b08801cbdf 100644 (file)
@@ -5,27 +5,6 @@
 #include <linux/export.h>
 #include <linux/bootmem.h>
 
-int __first_cpu(const cpumask_t *srcp)
-{
-       return min_t(int, NR_CPUS, find_first_bit(srcp->bits, NR_CPUS));
-}
-EXPORT_SYMBOL(__first_cpu);
-
-int __next_cpu(int n, const cpumask_t *srcp)
-{
-       return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
-}
-EXPORT_SYMBOL(__next_cpu);
-
-#if NR_CPUS > 64
-int __next_cpu_nr(int n, const cpumask_t *srcp)
-{
-       return min_t(int, nr_cpu_ids,
-                               find_next_bit(srcp->bits, nr_cpu_ids, n+1));
-}
-EXPORT_SYMBOL(__next_cpu_nr);
-#endif
-
 /**
  * cpumask_next_and - get the next cpu in *src1p & *src2p
  * @n: the cpu prior to the place to search (ie. return will be > @n)