kernel/sched/cpudeadline.c: Fixed coding style error and warnings.
PATCH 1/1 kernel/sched/cpudeadline.c: Fixed coding style error and warnings.
- Fixed style error: Missing space before the open parenthesis
- Fixed style warnings: 2x Missing blank line after declaration
One warning left: else after return
(I don't feel comfortable fixing that without side effects)
Signed-off-by Mario Leinweber <[email protected]>
--- kernel/sched/cpudeadline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
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
tip-bot for Mario Leinweber
merge bot[tip:sched/core] sched/deadline: Clean up various coding style details
sched/deadline: Clean up various coding style details
Commit-ID: c2e513821d5df5e772287f6d0c23fd17b7c2bb1a Gitweb: https://git.kernel.org/tip/c2e513821d5df5e772287f6d0c23fd17b7c2bb1a Author: Mario Leinweber <[email protected]> AuthorDate: Fri, 2 Mar 2018 13:20:07 -0500 Committer: Ingo Molnar <[email protected]> CommitDate: Sat, 3 Mar 2018 15:50:20 +0100
sched/deadline: Clean up various coding style details
- Fixed style error: Missing space before the open parenthesis
- Fixed style warnings: 2x Missing blank line after declaration
One warning left: else after return
(I don't feel comfortable fixing that without side effects)
Signed-off-by Mario Leinweber <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/sched/cpudeadline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
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;