[PATCH] cpumask: uninline next_cpu()
authorAndrew Morton <akpm@osdl.org>
Sat, 25 Mar 2006 11:08:09 +0000 (03:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:22:59 +0000 (08:22 -0800)
           text    data     bss     dec     hex filename
before: 3488027 1322496  360128 5170651  4ee5db vmlinux
after:  3485112 1322480  359968 5167560  4ed9c8 vmlinux

2931 bytes saved

Cc: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/cpumask.h
lib/cpumask.c

index 9b702fd24a7234afedc3f9c09e9fa12f6c5d56ee..4b29e508a0b611dbca86c889dbc8b1a8c60adf54 100644 (file)
@@ -215,16 +215,13 @@ static inline void __cpus_shift_left(cpumask_t *dstp,
 #ifdef CONFIG_SMP
 int __first_cpu(const cpumask_t *srcp);
 #define first_cpu(src) __first_cpu(&(src))
+int __next_cpu(int n, const cpumask_t *srcp);
+#define next_cpu(n, src) __next_cpu((n), &(src))
 #else
-#define first_cpu(src) 0
+#define first_cpu(src)         0
+#define next_cpu(n, src)       1
 #endif
 
-#define next_cpu(n, src) __next_cpu((n), &(src), NR_CPUS)
-static inline int __next_cpu(int n, const cpumask_t *srcp, int nbits)
-{
-       return min_t(int, nbits, find_next_bit(srcp->bits, nbits, n+1));
-}
-
 #define cpumask_of_cpu(cpu)                                            \
 ({                                                                     \
        typeof(_unused_cpumask_arg_) m;                                 \
index 1560d97390ddd06b5137c154060db3adf9125ea9..ba2f8543052c7a0158471d2a326b8c9b45e1386a 100644 (file)
@@ -9,3 +9,8 @@ int __first_cpu(const cpumask_t *srcp)
 }
 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);