Merge tag 'v4.1-rockchip-socfixes1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / lib / cpumask.c
index 5ab1553fd07633c3b729a8501ce89238f37174f5..830dd5dec40f1697b2bf2e40a294e05284ded89c 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)
@@ -90,13 +69,6 @@ bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node)
                dump_stack();
        }
 #endif
-       /* FIXME: Bandaid to save us from old primitives which go to NR_CPUS. */
-       if (*mask) {
-               unsigned char *ptr = (unsigned char *)cpumask_bits(*mask);
-               unsigned int tail;
-               tail = BITS_TO_LONGS(NR_CPUS - nr_cpumask_bits) * sizeof(long);
-               memset(ptr + cpumask_size() - tail, 0, tail);
-       }
 
        return *mask != NULL;
 }