aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched_rt.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r--kernel/sched_rt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 48d1f6e8497..c79dc784401 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -1130,8 +1130,8 @@ static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask)
if ((this_cpu != -1) && cpu_isset(this_cpu, *mask))
return this_cpu;
- first = first_cpu(*mask);
- if (first != NR_CPUS)
+ first = cpumask_first(mask);
+ if (first < nr_cpu_ids)
return first;
return -1;