OSDN Git Service

sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check
[android-x86/kernel.git] / kernel / sched / cpupri.c
index 1095e87..b3f0a27 100644 (file)
@@ -70,8 +70,7 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p,
        int idx = 0;
        int task_pri = convert_prio(p->prio);
 
-       if (task_pri >= MAX_RT_PRIO)
-               return 0;
+       BUG_ON(task_pri >= CPUPRI_NR_PRIORITIES);
 
        for (idx = 0; idx < task_pri; idx++) {
                struct cpupri_vec *vec  = &cp->pri_to_cpu[idx];