Skip to content

Commit 14c3841

Browse files
committed
cpumask: drop cpumask_next_wrap_old()
Now that we have cpumask_next_wrap() wired to generic find_next_bit_wrap(), the old implementation is not needed. Signed-off-by: Yury Norov <[email protected]>
1 parent 7a61069 commit 14c3841

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

include/linux/cpumask.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -332,27 +332,6 @@ unsigned int cpumask_next_wrap(int n, const struct cpumask *src)
332332
#define for_each_cpu(cpu, mask) \
333333
for_each_set_bit(cpu, cpumask_bits(mask), small_cpumask_bits)
334334

335-
#if NR_CPUS == 1
336-
static __always_inline
337-
unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap)
338-
{
339-
cpumask_check(start);
340-
if (n != -1)
341-
cpumask_check(n);
342-
343-
/*
344-
* Return the first available CPU when wrapping, or when starting before cpu0,
345-
* since there is only one valid option.
346-
*/
347-
if (wrap && n >= 0)
348-
return nr_cpumask_bits;
349-
350-
return cpumask_first(mask);
351-
}
352-
#else
353-
unsigned int __pure cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap);
354-
#endif
355-
356335
/**
357336
* for_each_cpu_wrap - iterate over every cpu in a mask, starting at a specified location
358337
* @cpu: the (optionally unsigned) integer iterator

lib/cpumask.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,6 @@
77
#include <linux/memblock.h>
88
#include <linux/numa.h>
99

10-
/**
11-
* cpumask_next_wrap_old - helper to implement for_each_cpu_wrap
12-
* @n: the cpu prior to the place to search
13-
* @mask: the cpumask pointer
14-
* @start: the start point of the iteration
15-
* @wrap: assume @n crossing @start terminates the iteration
16-
*
17-
* Return: >= nr_cpu_ids on completion
18-
*
19-
* Note: the @wrap argument is required for the start condition when
20-
* we cannot assume @start is set in @mask.
21-
*/
22-
unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap)
23-
{
24-
unsigned int next;
25-
26-
again:
27-
next = cpumask_next(n, mask);
28-
29-
if (wrap && n < start && next >= start) {
30-
return nr_cpumask_bits;
31-
32-
} else if (next >= nr_cpumask_bits) {
33-
wrap = true;
34-
n = -1;
35-
goto again;
36-
}
37-
38-
return next;
39-
}
40-
EXPORT_SYMBOL(cpumask_next_wrap_old);
41-
4210
/* These are not inline because of header tangles. */
4311
#ifdef CONFIG_CPUMASK_OFFSTACK
4412
/**

0 commit comments

Comments
 (0)