kernel/sched/cpudeadline: Fixed code style errors and warnings
PATCH 1/1 kernel/sched/cpudeadline: Fixed code style errors and warnings
kernel/sched/cpudeadline.c +4 -1
@@ -42,8 +42,9 @@ static void cpudl_heapify_down(struct cpudl *cp, int idx)return ;/* adapted from lib/prio_heap.c */ -while (1 ) { +while (1 ) {u64 largest_dl; + l =left_child (idx); r =right_child (idx); largest = idx;
@@ -131,6 +132,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,return 1 ; }else {int best_cpu =cpudl_maximum (cp); +WARN_ON (best_cpu !=-1 && !cpu_present (best_cpu)); if (cpumask_test_cpu(best_cpu, &p->cpus_allowed) &&
@@ -205,6 +207,7 @@ void cpudl_set(struct cpudl *cp, int cpu, u64 dl) old_idx = cp->elements[cpu].idx;if (old_idx ==IDX_INVALID ) {int new_idx = cp->size++; + cp->elements[new_idx].dl = dl; cp->elements[new_idx].cpu = cpu; cp->elements[cpu].idx = new_idx;
Signature · 1 line
2.14.3
Quoted 24 lines · Mario Leinweber
kernel/sched/cpudeadline.c +3
-1@@ -42,8 +42,9 @@ static void cpudl_heapify_down(struct cpudl *cp, int idx)return ;/* adapted from lib/prio_heap.c */ -while (1 ) { +while (1 ) {u64 largest_dl; + l =left_child (idx); r =right_child (idx); largest = idx;@@ -131,6 +132,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,return 1 ; }else {int best_cpu =cpudl_maximum (cp); +WARN_ON (best_cpu !=-1 && !cpu_present (best_cpu)); if (cpumask_test_cpu(best_cpu, &p->cpus_allowed) &&
kernel/sched/cpudeadline.c void cpudl_set(struct cpudl *cp, int cpu, u64 dl) · line 213
Quoted 7 lines
kernel/sched/cpudeadline.c +1
-0@@ -205,6 +207,7 @@ void cpudl_set(struct cpudl *cp, int cpu, u64 dl) old_idx = cp->elements[cpu].idx;if (old_idx ==IDX_INVALID ) {int new_idx = cp->size++; + cp->elements[new_idx].dl = dl; cp->elements[new_idx].cpu = cpu; cp->elements[cpu].idx = new_idx;
Your Signed-off-by tag is missing.
Thanks,
Ingo